ONNX format โ export from any framework
Drop your .onnx model here
sklearn ยท PyTorch ยท TensorFlow ยท XGBoost ยท LightGBM
from skl2onnx import convert_sklearn
from skl2onnx.common.data_types import FloatTensorType
# Convert any sklearn pipeline/model
initial_type = [('float_input', FloatTensorType([None, X_train.shape[1]]))]
onnx_model = convert_sklearn(model, initial_types=initial_type)
with open("model.onnx", "wb") as f:
f.write(onnx_model.SerializeToString())