Closed vewald closed 3 years ago
It is not possible. One reason is the ONNX only keeps information about inference, not training. A linear regression looks the same whether it was built with class LinearRegression or Ridge or ...
@xadupre : Alright that's good to know. I'm also wondering whether the cost function can be accessed and modified in ONNX?
What do you mean by the cost function? The cost function is part of the training but it should not change the inference. After the conversion of a pipeline to ONNX, it is possible store some information in the ONNX description (doc_string
). You may also store numerical parameter as initializer (see example Store arrays in one onnx graph).
@xadupre Like training it directly on ONNX.. I saw some operators here: https://github.com/onnx/onnx/blob/master/docs/Operators.md
I saw something like ReLU or MaxPooling... Aren't these functions meant to modify the cost function? Or does these operators working like a wrapper for another libraries?
They are mostly using for deep learning models coming from tensorflow or pytorch. It is not possible to train with ONNX but it is for some models with onnxruntime, see https://github.com/microsoft/onnxruntime-training-examples.
May I close this issue?
Yes, I considered it as closed.
Hi,
I am wondering whether ONNX model can be converted back to Sklearn?