colornet icon indicating copy to clipboard operation
colornet copied to clipboard

not find jpg files

Open favouriter opened this issue 6 years ago • 2 comments

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)

favouriter avatar Apr 12 '18 07:04 favouriter

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

RibbonsAlmark avatar Aug 22 '19 02:08 RibbonsAlmark

Any update about shape error? @RibbonsAlmark

Rive4 avatar Feb 07 '20 10:02 Rive4