为什么我在python中收到此错误-> NameError:未定义名称'FloatTensorType'

时间:2020-04-26 23:09:02

标签: python

initial_type = [('numfeat', FloatTensorType([None, 3])),
                ('strfeat', StringTensorType([None, 2]))]
model_onnx = convert_sklearn(model, initial_types=initial_type)

为什么会出现错误 NameError:名称“ FloatTensorType”未定义 在python中?

1 个答案:

答案 0 :(得分:-1)

仔细检查所有已安装的ONNX库的版本。它们应该是> 1.7.0