Last active
October 7, 2019 15:34
-
-
Save naxty/820fb835b5d7c94693bcae901a308ee6 to your computer and use it in GitHub Desktop.
Converts sklearn model to onnx model.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from skl2onnx import convert_sklearn | |
from skl2onnx.common.data_types import FloatTensorType | |
initial_type = [('float_input', FloatTensorType([1, 10]))] | |
onx = convert_sklearn(model, initial_types=initial_type) | |
with open("boston_housing.onnx", "wb") as f: | |
f.write(onx.SerializeToString()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment