Advertisement
Guest User

Untitled

a guest
Oct 5th, 2016
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. def process_image_fc2(fname, layer=1):
  2.     sess = tf.Session()
  3.     imgs = tf.placeholder(tf.float32, [None, 224, 224, 3])
  4.     vgg = vgg16(imgs, '/mipt_mln/vgg16_weights.npz', sess)
  5.     img1 = imread(fname, mode='RGB')
  6.     img1 = imresize(img1, (224, 224))
  7.     print(vgg.fc2[:20]) # this is error line
  8.     return vgg, sess.run(vgg.fc2, feed_dict={vgg.imgs: [img1]})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement