tensorflow / tpu

Reference models and tools for Cloud TPUs.
https://cloud.google.com/tpu/
Apache License 2.0
5.22k stars 1.77k forks source link

Mixnet output nodes #505

Open dhananjaisharma10 opened 5 years ago

dhananjaisharma10 commented 5 years ago

Hi!

I'm trying to freeze the graph for mixnet-s. But I'm not sure how to get the output node names. Please let me know.

Thanks!

saberkun commented 5 years ago

You could try "logits": https://github.com/tensorflow/tpu/blob/master/models/official/mnasnet/post_quantization.py It shares code with mnasnet. BTW, you can always train the model and export a savedmodel to inspect signatures we defined.

dhananjaisharma10 commented 5 years ago

Thanks for the same!

I'm trying to convert the frozen model of mixnet-s to Core ML using the tfcoreml converter. But when I feed the .pb file of this model to the converter, I get the following error:

OutOfRangeError: Node 'mixnet-s/mixnet_model/stem/batch_normalization/FusedBatchNormV3' (type: 'Add', num of outputs: 1) does not have output 5

I think I need to restore the model with the build function's argument training = False and then freeze the entire graph. But I'm completely unsure about this approach. Though I'll keep looking, please let me know if you have any suggestions. I'm relatively new to TF.

Thanks in advance!