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

Error while training #19

Open
fotsing365 opened this issue Feb 13, 2018 · 1 comment
Open

Error while training #19

fotsing365 opened this issue Feb 13, 2018 · 1 comment

Comments

@fotsing365
Copy link

when I try to train the model I obtain this error could somebody help me?

Saving results to input
Launching 1 threads for spacings: [[0, 71]]
2018-02-13 15:15:23.414452: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "tfrecorder.py", line 96, in _process_image_files_batch
image_buffer, height, width = _process_image(filename, coder)
File "tfrecorder.py", line 53, in _process_image
image_data = f.read()
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 126, in read
pywrap_tensorflow.ReadFromStream(self._read_buf, length, status))
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 94, in _prepare_value
return compat.as_str_any(val)
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/util/compat.py", line 106, in as_str_any
return as_str(value)
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/util/compat.py", line 84, in as_text
return bytes_or_text.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2018-02-13 15:15:24.444012: Finished writing all 71 images in data set.
Launching 1 threads for spacings: [[0, 39]]
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "tfrecorder.py", line 96, in _process_image_files_batch
image_buffer, height, width = _process_image(filename, coder)
File "tfrecorder.py", line 53, in _process_image
image_data = f.read()
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 126, in read
pywrap_tensorflow.ReadFromStream(self._read_buf, length, status))
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 94, in _prepare_value
return compat.as_str_any(val)
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/util/compat.py", line 106, in as_str_any
return as_str(value)
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/util/compat.py", line 84, in as_text
return bytes_or_text.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2018-02-13 15:15:25.452242: Finished writing all 39 images in data set.
Launching 1 threads for spacings: [[0, 76]]
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "tfrecorder.py", line 96, in _process_image_files_batch
image_buffer, height, width = _process_image(filename, coder)
File "tfrecorder.py", line 53, in _process_image
image_data = f.read()
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 126, in read
pywrap_tensorflow.ReadFromStream(self._read_buf, length, status))
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 94, in _prepare_value
return compat.as_str_any(val)
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/util/compat.py", line 106, in as_str_any
return as_str(value)
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/util/compat.py", line 84, in as_text
return bytes_or_text.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2018-02-13 15:15:26.460194: Finished writing all 76 images in data set.
Launching 1 threads for spacings: [[0, 82]]
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "tfrecorder.py", line 96, in _process_image_files_batch
image_buffer, height, width = _process_image(filename, coder)
File "tfrecorder.py", line 53, in _process_image
image_data = f.read()
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 126, in read
pywrap_tensorflow.ReadFromStream(self._read_buf, length, status))
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 94, in _prepare_value
return compat.as_str_any(val)
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/util/compat.py", line 106, in as_str_any
return as_str(value)
File "/home/cedriq/.local/lib/python3.5/site-packages/tensorflow/python/util/compat.py", line 84, in as_text
return bytes_or_text.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

2018-02-13 15:15:27.467536: Finished writing all 82 images in data set.

@CheeseAnt
Copy link

In the file tfrecorder.py,
find the line "with tf.gfile.FastGFile(filename, 'r') as f:
and change the 'r' to 'rb'.
That will fix it.

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

2 participants