keras-openpose-reproduce icon indicating copy to clipboard operation
keras-openpose-reproduce copied to clipboard

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

Open WangJie19960331 opened this issue 7 years ago • 2 comments

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 ?

WangJie19960331 avatar Aug 09 '18 08:08 WangJie19960331

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.

kevinlin311tw avatar Aug 09 '18 19:08 kevinlin311tw

Thank you, how can I get the graphics? ----- 原始邮件 ----- 发件人:Kevin Ke-Yun Lin [email protected] 收件人:kevinlin311tw/keras-openpose-reproduce [email protected] 抄送人:WangJie19960331 [email protected], Author [email protected] 主题: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.

WangJie19960331 avatar Aug 10 '18 00:08 WangJie19960331