Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not run train.py #4

Closed
umar-sharif opened this issue Feb 3, 2017 · 6 comments
Closed

can not run train.py #4

umar-sharif opened this issue Feb 3, 2017 · 6 comments

Comments

@umar-sharif
Copy link

umar-sharif commented Feb 3, 2017

Hi,
I'm trying to run train.py and getting following error

161
j= 0
(20, 224, 224, 3) Image Shape
Traceback (most recent call last):
File train.py", line 131, in
content_features =get_content_feature(img_4d).reshape((get_content_feature(img_4d).shape[0],77512))
File "train.py", line 87, in get_content_feature 'vgg/dropout/random_uniform:0': [[1.0]]
File "tensorflow\python\framework\ops.py", line 575, in eval return _eval_using_default_session(self, feed_dict, self.graph, session)
File "tensorflow\python\framework\ops.py", line 3633, in _eval_using_default_session return session.run(tensors, feed_dict)
File "tensorflow\python\client\session.py", line 766, in run run_metadata_ptr)
File "tensorflow\python\client\session.py", line 943, in _run % (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (1, 1) for Tensor 'vgg/dropout/random_uniform:0', which has shape '(?, 4096)'

Could you help me with this. I'm new to python.

Thanks.

@ayush1997
Copy link
Owner

Hi @umar-sharif
sry for late reply which tensorflow version are you using.

@umar-sharif
Copy link
Author

Hi @ayush1997
I'm using tensorflow 0.12 and python 3.5

@salmonQ
Copy link

salmonQ commented Mar 23, 2017

@umar-sharif
I've met the same problem。
solved it by changing codes 'vgg/dropout/random_uniform:0':[[1.0]] into 'vgg/dropout/random_uniform:0':[[1.0]*4096]

@prateeknepaliya09
Copy link

prateeknepaliya09 commented Jun 29, 2017

@salmonQ I have made the following changes, same error. Any inputs?

@prateeknepaliya09
Copy link

@ayush1997 Can you look into it?

@ayush1997
Copy link
Owner

@umar-sharif @salmonQ @prateeknepaliya09 sorry for such a late reply,have made some changes.
It is tested on Tensorflow1.12 and Python 2.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants