keras_to_tensorflow icon indicating copy to clipboard operation
keras_to_tensorflow copied to clipboard

Converted model loss some output layers

Open why702 opened this issue 6 years ago • 1 comments

I used the keras model from https://github.com/qqwweee/keras-yolo3 I can successfully convert form .h to .pb.

Output:

input args: Namespace(f=None, graph_def=False, input_fld='.', input_model_file='/home/bill/git/keras-yolo3/model_data/yolo.h5', num_outputs=1, output_fld='', output_graphdef_file='model.ascii', output_model_file='', output_node_prefix='output_node', quantize=False, theano_backend=False) /home/bill/anaconda3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Using TensorFlow backend. 2018-06-07 18:38:41.629332: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA /home/bill/.local/lib/python3.6/site-packages/keras/models.py:255: UserWarning: No training configuration found in save file: the model was not compiled. Compile it manually. warnings.warn('No training configuration found in save file: ' output nodes names are: ['output_node0'] Converted 292 variables to const ops. saved the freezed graph (ready for inference) at: yolo.h5.pb

Process finished with exit code 0

and the keras summary show the latest 3 layers are conv2d_59 (Conv2D) (None, None, None, 2 261375 leaky_re_lu_58[0][0]
conv2d_67 (Conv2D) (None, None, None, 2 130815 leaky_re_lu_65[0][0]
conv2d_75 (Conv2D) (None, None, None, 2 65535 leaky_re_lu_72[0][0]

However, the pb file I checked with tensorboard losses conv2d_67 and conv2d_75. Do you know what happened?

why702 avatar Jun 07 '18 10:06 why702

@why702 @amir-abdi yeah,so the same things comes to me,I din't know the result is true or false,when i put the .pb file to the office tensorflow-android demo,there is crash to me,can anyone help me ,ths a lot

shenyingying avatar Dec 13 '18 02:12 shenyingying