shamangary/SSR-Net

.h5 model to .pb model but output node is strange!

A1exy opened this issue · 4 comments

A1exy commented

I transfer h5 model to .pb model but output node is strange, the output node is pred_a/mul_33, I can't find this node in the tensorflow graph, do you know the reason, thanks!

image

image

image

find pred_a/mul_33 node, but I don't know what the node means.

https://github.com/shamangary/SSR-Net/blob/master/training_and_testing/SSRNET_model.py#L170
Hello. Please check this line. pred_a is basically the final ssr-module for putting everything together into a single age prediction.

I am not familiar with your tool, but the graph representation can be found in https://github.com/shamangary/SSR-Net/blob/master/pre-trained/morph2/ssrnet_3_3_3_64_1.0_1.0/ssrnet_3_3_3_64_1.0_1.0.png

As for our extension FSA-Net has a more structure organization similiar to SSR-Net as well.
Please check
https://github.com/shamangary/FSA-Net/blob/master/pre-trained/300W_LP_models/fsanet_capsule_3_16_2_21_5/ssrnet_R2_capsule_3_16_2_21_5.png
and the png files inside the same folder.

A1exy commented

Thanks for your reply. The structure of the transferred pb model looks correct, but the output node pred_a/mul_33 is very strange, Keras inference is right, but tensorflow is wrong.

image

My guess is that the Lambda layer in Keras is not directly transferable to Tensorflow. So maybe the function of the SSR-Module is not really working now. Maybe an adapted version of such module is needed for tensorflow somehow.

A1exy commented

Thanks.