Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def process_image_fc2(fname, layer=1):
- sess = tf.Session()
- imgs = tf.placeholder(tf.float32, [None, 224, 224, 3])
- vgg = vgg16(imgs, '/mipt_mln/vgg16_weights.npz', sess)
- img1 = imread(fname, mode='RGB')
- img1 = imresize(img1, (224, 224))
- print(vgg.fc2[:20]) # this is error line
- return vgg, sess.run(vgg.fc2, feed_dict={vgg.imgs: [img1]})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement