[英]Why am I getting this error in python--> NameError: name 'FloatTensorType' is not defined
initial_type = [('numfeat', FloatTensorType([None, 3])), ('strfeat', StringTensorType([None, 2]))] model_onnx = convert_sklearn(model, initial_types=initial_type)
Why am I getting the error NameError: name 'FloatTensorType' is not defined in python?为什么我收到错误 NameError: name 'FloatTensorType' is not defined in python?
You have to import FloatTensorType:您必须导入 FloatTensorType:
from onnxmltools.convert.sparkml.utils import FloatTensorType
Double check versions of all installed ONNX libraries.仔细检查所有已安装 ONNX 库的版本。 They should be > 1.7.0它们应该 > 1.7.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.