Closed dzyjjpy closed 5 years ago
@dzyjjpy Hello, i am also trying to convert a Head Pose Estimation (Hopenet) model trained using pytorch to caffe by this repository. Can you share some advice how to use this repository to do so ?
@dzyjjpy @trohit920 Thanks for interested in this repo and I am very glad this is helpful for you. What's the type of your last two layers? Or you can provide me a simple model for debugging. I will try to find the reason when I have free time.
@longcw Hi , I have convert successfully before. thanks for your concern
@trohit920 after network initialization, call the pytorch2caffe function to convert. pay attention to the output layers, as it has three branch, so you need to edit some code in pytorch2caffe.py
Hi @longcw , thanks for your extraordinary work for the tool: pytorch2caffe at first.
And I used it to convert svhn\ hopenet and other pytorch model successfully. However, when converting HeadPose, one of my own network for predicting roll,pitch, yaw degree of human face, the last two layers(220: scale+bn, 221:relu,), it didn't write the weights into .caffemodel like .prototxt describes. cannot get blobs data using: net.blobs[output_name].data after net.forward() As I debug the python code for using caffemodel, it shows no layer 220 and 221 in headpose net created by .prototxt and .caffemodel we got by convertion. Do you have any advice? Thanks