Converting Caffe models to tensorflow 2.2 models in colab

Posting this quickly because I could not for the life of me figure out how to do it

!mmconvert --srcFramework caffe --inputWeight /tmp/nst/resnext50.caffemodel --inputNetwork /tmp/nst/resnext50_deploy.prototxt --dstFramework tensorflow --outputModel /tmp/nst/out
import tensorflow as tf
imported = tf.saved_model.load('/tmp/nst/out')
s = imported.signatures['serving_default']
print(s.inputs) # Tells you desired shape of inputs
test_data = tf.zeros([1, 224, 224, 3])
s(tf.constant(test_data))

Comments

  1. Gadgets must be designed to the Roaming of their SIM card carrier to provide additional security. Roaming M2M SIM Card

    ReplyDelete

Post a Comment

Popular posts from this blog

How important is the first video you create on TikTok?

Skincare products recommended on TikTok

Are likes, shares, or comments more important for TikTok video success?