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])


Popular posts from this blog

Skincare products recommended on TikTok

Full regression results

Guest Post: Homophily in TikTok Recommendations