sklearn-onnx: BooleanTensorType not supported?

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?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

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!