You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from sklearn.multioutput import MultiOutputRegressor from lightgbm import LGBMRegressor model = MultiOutputRegressor(LGBMRegressor()) model.fit(X_train, y_train)
import onnxmltools import onnxmltools.convert.common.data_types from skl2onnx import convert_sklearn from skl2onnx.common.data_types import FloatTensorType initial_type = [('float_input', FloatTensorType([None, 1997]))] onx = onnxmltools.convert.convert_lightgbm(model, initial_types=initial_type) with open("test.onnx", mode = 'wb') as f: f.write(onx.SerializeToString())
Hi,
I tried to export this model to onnx:
from sklearn.multioutput import MultiOutputRegressor from lightgbm import LGBMRegressor model = MultiOutputRegressor(LGBMRegressor()) model.fit(X_train, y_train)
import onnxmltools import onnxmltools.convert.common.data_types from skl2onnx import convert_sklearn from skl2onnx.common.data_types import FloatTensorType initial_type = [('float_input', FloatTensorType([None, 1997]))] onx = onnxmltools.convert.convert_lightgbm(model, initial_types=initial_type) with open("test.onnx", mode = 'wb') as f: f.write(onx.SerializeToString())
https://prnt.sc/tbSL1q9JFmzs
Output:
ValueError: No proper operator name found for '<class 'sklearn.multioutput.MultiOutputRegressor'>'
Is it possible to use onnxmltools to export this model to onnx? Thanks for any help.
The text was updated successfully, but these errors were encountered: