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

help! #11

Open
roy920407 opened this issue May 9, 2017 · 4 comments
Open

help! #11

roy920407 opened this issue May 9, 2017 · 4 comments

Comments

@roy920407
Copy link

roy920407 commented May 9, 2017

您好,感謝您提供的程式碼,
我根據您提供的程式在執行上遇到了這些問題,請問應該如何解決?
謝謝您
Not a JPEG file: starts with 0x3d 0x3d
Done training -- epoch limit reached
Traceback (most recent call last):
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1039, in _do_call
return fn(*args)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1021, in _run_fn
status, run_metadata)
File "C:\Program Files\Anaconda3\lib\contextlib.py", line 66, in exit
next(self.gen)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid JPEG data, size 6080
[[Node: DecodeJpeg = DecodeJpegacceptable_fraction=1, channels=3, dct_method="", fancy_upscaling=true, ratio=1, try_recover_truncated=false, _device="/job:localhost/replica:0/task:0/cpu:0"]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "train.py", line 26, in
tf.app.run()
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "train.py", line 23, in main
solver.train()
File "C:\Users\User\Desktop\PRSR\tools\solver.py", line 88, in train
coord.join(threads)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\coordinator.py", line 389, in join
six.reraise(*self._exc_info_to_raise)
File "C:\Program Files\Anaconda3\lib\site-packages\six.py", line 686, in reraise
raise value
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\queue_runner_impl.py", line 234, in _run
sess.run(enqueue_op)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 778, in run
run_metadata_ptr)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 982, in _run
feed_dict_string, options, run_metadata)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1032, in _do_run
target_list, options, run_metadata)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1052, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid JPEG data, size 6080
[[Node: DecodeJpeg = DecodeJpegacceptable_fraction=1, channels=3, dct_method="", fancy_upscaling=true, ratio=1, try_recover_truncated=false, _device="/job:localhost/replica:0/task:0/cpu:0"]]

Caused by op 'DecodeJpeg', defined at:
File "train.py", line 26, in
tf.app.run()
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "train.py", line 22, in main
solver = Solver()
File "C:\Users\User\Desktop\PRSR\tools\solver.py", line 36, in init
self.dataset = DataSet(conf.imgs_list_path, self.num_epoch, self.batch_size)
File "C:\Users\User\Desktop\PRSR\tools\data.py", line 18, in init
image = tf.image.decode_jpeg(image_file, 3)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_image_ops.py", line 345, in decode_jpeg
dct_method=dct_method, name=name)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 768, in apply_op
op_def=op_def)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 2336, in create_op
original_op=self._default_original_op, op_def=op_def)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1228, in init
self._traceback = _extract_stack()

InvalidArgumentError (see above for traceback): Invalid JPEG data, size 6080
[[Node: DecodeJpeg = DecodeJpegacceptable_fraction=1, channels=3, dct_method="", fancy_upscaling=true, ratio=1, try_recover_truncated=false, _device="/job:localhost/replica:0/task:0/cpu:0"]]

@luckyboysmith
Copy link

你看下你用的data是jpg还是png
如果是jpg 在data那里应该是decode_jpg
如果是png 在data那里应该是decode_png
改一下即可

@roy920407
Copy link
Author

roy920407 commented May 24, 2017

@luckyboysmith
所以意思是celebA 裡面有分
img_align_celeba、
img_align_celeba_png、
img_celeba
這三種只要選一種就好的意思嗎??因為裡面有png又有jpg

而且最近不知道為何又有新的錯誤,無法寫入。上網GOOGLE也找不到原因,請問有甚麼原因會造成這樣的錯誤
Traceback (most recent call last):
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1039, in _do_call
return fn(*args)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1021, in _run_fn
status, run_metadata)
File "C:\Program Files\Anaconda3\lib\contextlib.py", line 66, in exit
next(self.gen)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.UnknownError: NewRandomAccessFile failed to Create/Open: C:\Users\User\Desktop\prsr\tools\data\celebA\Anno : \udca6s\udca8\udcfa\udcb3Q\udca9\u06a1C
; Input/output error
[[Node: ReaderReadV2 = ReaderReadV2[_device="/job:localhost/replica:0/task:0/cpu:0"](WholeFileReaderV2, input_producer)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "train.py", line 26, in
tf.app.run()
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "train.py", line 23, in main
solver.train()
File "C:\Users\User\Desktop\prsr\tools\solver.py", line 88, in train
coord.join(threads)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\coordinator.py", line 389, in join
six.reraise(*self._exc_info_to_raise)
File "C:\Program Files\Anaconda3\lib\site-packages\six.py", line 686, in reraise
raise value
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\queue_runner_impl.py", line 234, in _run
sess.run(enqueue_op)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 778, in run
run_metadata_ptr)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 982, in _run
feed_dict_string, options, run_metadata)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1032, in _do_run
target_list, options, run_metadata)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1052, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.UnknownError: NewRandomAccessFile failed to Create/Open: C:\Users\User\Desktop\prsr\tools\data\celebA\Anno : \udca6s\udca8\udcfa\udcb3Q\udca9\u06a1C
; Input/output error
[[Node: ReaderReadV2 = ReaderReadV2[_device="/job:localhost/replica:0/task:0/cpu:0"](WholeFileReaderV2, input_producer)]]

Caused by op 'ReaderReadV2', defined at:
File "train.py", line 26, in
tf.app.run()
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "train.py", line 22, in main
solver = Solver()
File "C:\Users\User\Desktop\prsr\tools\solver.py", line 36, in init
self.dataset = DataSet(conf.imgs_list_path, self.num_epoch, self.batch_size)
File "C:\Users\User\Desktop\prsr\tools\data.py", line 17, in init
_, image_file = image_reader.read(filename_queue)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\io_ops.py", line 193, in read
return gen_io_ops._reader_read_v2(self._reader_ref, queue_ref, name=name)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_io_ops.py", line 411, in _reader_read_v2
queue_handle=queue_handle, name=name)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 768, in apply_op
op_def=op_def)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 2336, in create_op
original_op=self._default_original_op, op_def=op_def)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1228, in init
self._traceback = _extract_stack()

UnknownError (see above for traceback): NewRandomAccessFile failed to Create/Open: C:\Users\User\Desktop\prsr\tools\data\celebA\Anno : \udca6s\udca8\udcfa\udcb3Q\udca9\u06a1C
; Input/output error
[[Node: ReaderReadV2 = ReaderReadV2[_device="/job:localhost/replica:0/task:0/cpu:0"](WholeFileReaderV2, input_producer)]]

@luckyboysmith
Copy link

@roy920407 不好意思 你的回复不知怎么回事 邮件提醒被分类到垃圾箱了
最近我做了相关尝试 我个人建议 你最好用celebA align png
然后再用网络训练之前 做一个face crop
这样结果很好 和论文里几乎一致 清晰度上有些差别 细节方面 比wiki上展示的结果要好

@Abel150
Copy link

Abel150 commented Mar 26, 2018

你好, @luckyboysmith 我最近在阅读相关的论文和代码,对于代码中的生成sample的c_logits和p_logits有很多疑问,请问一下该怎么理解

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