I have my PyTorch model and I need to make an android app using it for a demo. I was thinking of somehow converting it into a tensorflow model by manually copying weights using a dictionary but is there any easier way? Thanks in advance
Yeah, you’ll have to use something like TensorFlow or Caffe2. We’re working on ways to improve exporting models, but for now you’ll have to:
- Get the weights via
- Convert the
Tensorsto NumPy arrays
- Copy the weights into your TensorFlow or Caffe2 model
I’ve been having lots and lots of trouble trying to convert my model to tensorflow. Does torch-android still have support? I’m unable to build it for some reason.
maybe it would be better to have isolated model on backend of your application since you don’t have ability to run in directly on devices?
Could you give a walk-through example for those steps? Thanks!
@colesbury: Have there been any recent developments on this topic since you posted your last answer (Aug’17)? Or is the process still roughly the same? Thank you so much.