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

not find jpg files #16

Open
favouriter opened this issue Apr 12, 2018 · 2 comments
Open

not find jpg files #16

favouriter opened this issue Apr 12, 2018 · 2 comments

Comments

@favouriter
Copy link

filenames = sorted(glob.glob("../colornet//.jpg"))
File "train.py", line 179, in
colorimage = input_pipeline(filenames, batch_size, num_epochs=num_epochs)
File "train.py", line 31, in input_pipeline
filenames, num_epochs=num_epochs, shuffle=False)

@RibbonsAlmark
Copy link

RibbonsAlmark commented Aug 22, 2019

filenames = sorted(glob.glob("../colornet//.jpg"))
File "train.py", line 179, in
colorimage = input_pipeline(filenames, batch_size, num_epochs=num_epochs)
File "train.py", line 31, in input_pipeline
filenames, num_epochs=num_epochs, shuffle=False)

This problem cause by:

filenames = sorted(glob.glob("../colornet//.jpg"))

at line 8 of train.py.Program can't find any .jpg file under this direction because all images are .png form.You can solve this problem by put some jpg image files in this direction or just change this line into:

filenames = sorted(glob.glob("../colornet//"))

yes,just remove the '.jpg'..........=.=
But another bug will appear:

Traceback (most recent call last):
File "train.py", line 185, in
grayscale = tf.concat(3, [grayscale, grayscale, grayscale])
File "/root/anaconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py", line 180, in wrapper
return target(*args, **kwargs)
File "/root/anaconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/python/ops/array_ops.py", line 1297, in concat
tensor_shape.scalar())
File "/root/anaconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/python/framework/tensor_shape.py", line 1103, in assert_is_compatible_with
raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (3, 1, 224, 224, 1) and () are incompatible

I'm still work on it now. =.=

PS: My English is sucks,So I will appreciate whoever point out any mistake I made in this answer

@Rive4
Copy link

Rive4 commented Feb 7, 2020

Any update about shape error? @RibbonsAlmark

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

3 participants