We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
data = load_diabetes() X = data.data y = data.target
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=42) model = RandomForestRegressor().fit(X_train, y_train)
onnx_model = convert_sklearn(model, 'lr', [('input', FloatTensorType(X_test.shape))]) save_model(onnx_model, 'lr.onnx') sess = InferenceSession('lr.onnx') res = sess.run(None, input_feed={'input': X_test.astype(np.float32)})
print(np.mean(np.isclose(model.predict(X_test), list(map(lambda x: x[0], res[0])))))
0.9411764705882353
With n_estimators=3 however, prediction matches go upto 0.99.
The text was updated successfully, but these errors were encountered:
This should be fixed by PR #237. Can you confirm?
Sorry, something went wrong.
Yes, it has been fixed now. Thanks!
No branches or pull requests
data = load_diabetes()
X = data.data
y = data.target
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=42)
model = RandomForestRegressor().fit(X_train, y_train)
onnx_model = convert_sklearn(model, 'lr', [('input', FloatTensorType(X_test.shape))])
save_model(onnx_model, 'lr.onnx')
sess = InferenceSession('lr.onnx')
res = sess.run(None, input_feed={'input': X_test.astype(np.float32)})
print(np.mean(np.isclose(model.predict(X_test), list(map(lambda x: x[0], res[0])))))
With n_estimators=3 however, prediction matches go upto 0.99.
The text was updated successfully, but these errors were encountered: