Open CarlosNacher opened 6 months ago
Hi! To trace a model, we need to perform inference on it. Do you have the inference script?
Hi! What do you exactly mean? I have my model.pt
(trained) and also, yes, I have some script that loads the torch model, the data, preprocesses data, does inference, etc. But why is the inference script needed to transfer the weights from one (torch) model to another (tf) one?
Thank you for your response!
I think nobuco converts a torch model to a keras model without losing the parameters. You can try to figure out the outputs with a same input.
it's possible to translate the weights https://github.com/johndpope/IMF/blob/feat/tensorflow-cips/tf-export.py https://github.com/johndpope/IMF/blob/feat/tensorflow-cips/tf-export2.py
https://github.com/AlexanderLutsenko/nobuco/pull/66 https://github.com/johndpope/nobuco/blob/master/examples/multihead-attention.py
Hi, I am new to your library and would quickly like to know if I could convert a pre-trained torch model to keras. I mean, from what I see in the README, what is converted is the model code, but if we have the weights in the .torch model, how do we put them to the new keras model?
Maybe this question is very obvious, but I don't see the direct way to do it.
Thanks in advance