pkmital / CADL

ARCHIVED: Contains historical course materials/Homework materials for the FREE MOOC course on "Creative Applications of Deep Learning w/ Tensorflow" #CADL
https://www.kadenze.com/courses/creative-applications-of-deep-learning-with-tensorflow/info
Apache License 2.0
1.48k stars 732 forks source link

Issue evaluating VGG16 model #95

Open JonasWG opened 6 years ago

JonasWG commented 6 years ago

When calling test_vgg() from vgg16.py output is: ValueError: Cannot feed value of shape (1, 1) for Tensor 'vgg/dropout_1/random_uniform:0', which has shape '(?, 4096)'

When trying to change shape to res = np.squeeze(softmax.eval(feed_dict={ x: img, 'vgg/dropout_1/random_uniform:0': [[1.0]*4096], 'vgg/dropout/random_uniform:0': [[1.0]*4096]}))

Output is: InvalidArgumentError (see above for traceback): Input to reshape is a tensor with 115200 values, but the requested shape requires a multiple of 25088 [[Node: vgg/Reshape = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](vgg/pool5, vgg/Reshape/shape)]]

This output was received on OSX, running Python3 and Tensorflow 1.7