question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BooleanTensorType not supported?

See original GitHub issue

I tried using convert_sklearn() with one of my initial_types set to BooleanTensorType([None, 1]): the conversion works but then when I try to load the model with onnxruntime, I get the following error:

onnxruntime.capi.onnxruntime_pybind11_state.InvalidGraph: [ONNXRuntimeError] : 10 : INVALID_GRAPH : This is an invalid model. Type Error: Type 'tensor(bool)' of input parameter (input1) of operator (ArrayFeatureExtractor) in node (ArrayFeatureExtractor) is invalid.

Is that expected?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16

github_iconTop GitHub Comments

1reaction
prabhat00155commented, Feb 19, 2020

Yeah, as I mentioned before, we need to add support for bool in the converters. I’ll mark this issue as enhancement and evaluate the work that needs to be done to support bool. In the mean time, you may use the casting approach. Thanks!

0reactions
victornoelcommented, May 12, 2020

@xadupre very nice, thx

Read more comments on GitHub >

github_iconTop Results From Across the Web

RuntimeError: Subtraction, the `-` operator, with a bool tensor ...
I use the torch12, met the same problem when i run the smplx project. You can use the code to replace the source...
Read more >
torch.onnx — PyTorch 1.13 documentation
Tensors , numeric types that can be trivially converted to torch.Tensors (e.g. float, int), and tuples and lists of those types are supported...
Read more >
tf.dtypes.DType | TensorFlow v2.11.0
Represents the type of the elements in a Tensor. ... Non-numeric, unordered, and quantized types are not considered unsigned, and this ...
Read more >
Basic Tensor Functionality — Theano 1.1.2+29.g8b2825658 ...
Theano supports any kind of Python object, but its focus is support for symbolic ... If you wish to use a type of...
Read more >
Layers — NVIDIA TensorRT Standard Python API ...
If the input tensor has shape {C, H, W} , then the tensor is reshaped into {1, C*H*W} . ... On Xavier, this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found