Modifying the training graph in java #19649
-
Hi, I am training a model in Java using ONNX. I have exported the training graph, evaluation graph, optimizer graph, and checkpoint in Python. I used these in ONNX Java to train the model. Because these graphs are fixed in Java, I can't change the model parameters when my data has changed. For example, if I export the graph with 10 neurons in the output layer, I can train the model in Java with data that has 10 labels. If my dataset has more than 10 labels, then again I should go back to Python and generate the graph. Is there any possibility to modify the graph in Java? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Not at the moment. The code which generates the different graphs based on the original ONNX model only has a Python interface. If it becomes a supported C or C++ API we could wrap a Java binding around it, and then construct the ONNX models from Java using something like Tribuo's ONNX generation support, though Tribuo's ONNX generation support doesn't cover all ONNX ops yet, or we could write the initial model protobuf directly. |
Beta Was this translation helpful? Give feedback.
Not at the moment. The code which generates the different graphs based on the original ONNX model only has a Python interface. If it becomes a supported C or C++ API we could wrap a Java binding around it, and then construct the ONNX models from Java using something like Tribuo's ONNX generation support, though Tribuo's ONNX generation support doesn't cover all ONNX ops yet, or we could write the initial model protobuf directly.