I am working on a project where I want to use mxnet for some predictions, but I am very new to the framework and definitely more focused on the ML side than the system side. In particular, it’s pretty easy for me to understand how to experiment with python/gluon but I am kind of stuck in trying to understand how to bring my networks in the production system my company is using.
If the production system would be in python, everything would be kind of easy but it is in Java (Scala also acceptable) and this creates a lot of confusion. I would like to provide “something” (i.e., some kind of serialized network) that can retrain the network with new data over time and can be used to make predictions, but without rewriting it in Java/Scala.
I really want to avoid rewriting code in two languages, because this will dramatically slow down my iterations over the model.
I see that serialized models can be read/imported with different language bindings and my understanding is that using the network to make prediction is trivial if it is pre-trained (but in my case it’s not – it will need to be trained from scratch) but I didn’t find any information about the retraining of the network.
My questions are:
- given my python/gluon code, is there a way to run the same network in Java/Scala? if yes, it just needs to be serialized or it requires a different procedure?
- what are the limitations of the different approaches in terms of network architecture?
- can I retrain my python-define network from Java/Scala code?
- I have some code doing some operations “around” the network, if I serialize the network this will be lost (I guess), should I make sure all my logic is in the forward method?
- is there some material on how to handle mxnet networks in different production environments? (I didn’t find anything satisfactory so far)