kevinlin311tw / keras-openpose-reproduce

Keras implementation of Realtime Multi-Person Pose Estimation
110 stars 43 forks source link

Can the model trained by your code be converted to a pb file and then deployed to tensorflow serving? #6

Open WangJie19960331 opened 6 years ago

WangJie19960331 commented 6 years ago

Hello, I have the following questions to ask you:

  1. Is the model you saved a weight that is only saved?
  2. Can the trained h5 file be converted to a pb model file?
  3. If the conversion is successful, can the model be deployed to the tensorflow serving ?
kevinlin311tw commented 6 years ago

Technically the h5 file can be converted to pb file for deploying on Tensorflow. It is doable, but it requires additional post-processing.

The h5 files only have weights. If you would like to build the pb file, you need to get the graph at first, and then load the weights with 0 learning rate (something like set_learning_phase(0) using Keras). Then, you may want to write graph in ascii, and convert variables to constants.

WangJie19960331 commented 6 years ago

Thank you, how can I get the graphics? ----- 原始邮件 ----- 发件人:Kevin Ke-Yun Lin notifications@github.com 收件人:kevinlin311tw/keras-openpose-reproduce keras-openpose-reproduce@noreply.github.com 抄送人:WangJie19960331 wongjee@sina.com, Author author@noreply.github.com 主题:Re: [kevinlin311tw/keras-openpose-reproduce] Can the model trained by your code be converted to a pb file and then deployed to tensorflow serving? (#6) 日期:2018年08月10日 03点03分

Technically the h5 file can be converted to pb file for deploying on Tensorflow. It is doable, but it requires additional post-processing. The h5 files only have weights. If you would like to build the pb file, you need to get the graph at first, and then load the weights with 0 learning rate (something like set_learning_phase(0) using Keras). Then, you may want to write graph in ascii, and convert variables to constants.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.