Closed 4Statistics closed 4 years ago
Just run the code on Python2 with Tensorflow version after r1.0. The code will be ran perfectly.
I think only Python 3 occurs this error.
Thank you, @seongkyun for stepping in :-) On Sun 2 Sep 2018 at 09:42, seongkyun notifications@github.com wrote:
Just run the code on Python2 with Tensorflow version after r1.0. The code will be ran perfectly.
I think only Python 3 occurs this error.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/haeusser/learning_by_association/issues/16#issuecomment-417911533, or mute the thread https://github.com/notifications/unsubscribe-auth/AFshmMTqyDqeYOQ_gc2l7t9wqWUNzCDuks5uW4v0gaJpZM4WU53Z .
Hello,haeusser,I was trying to reproduce the result on the paper too, SVHN to MNIST. But met error as "UnicodeDecodeError", Do you know how to correct the error? Thank you very much.
Extracting /media/sward/_lyh1/datasets/mnist//train-images-idx3-ubyte.gz Traceback (most recent call last): File "./learning_by_association/semisup/train.py", line 386, in
app.run()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "./learning_by_association/semisup/train.py", line 208, in main
FLAGS.target_dataset_split)
File "/media/sward/_lyh1/learning_by_association/semisup/tools/mnist3.py", line 34, in get_data
images, labels = mnist.get_data(name)
File "/media/sward/_lyh1/learning_by_association/semisup/tools/mnist.py", line 43, in get_data
'/train-images-idx3-ubyte.gz'), extract_labels(
File "/media/sward/_lyh1/learning_by_association/semisup/tools/mnist.py", line 60, in extract_images
magic = _read32(bytestream)
File "/media/sward/_lyh1/learning_by_association/semisup/tools/mnist.py", line 53, in _read32
return np.frombuffer(bytestream.read(4), dtype=dt)[0]
File "/usr/lib/python3.5/gzip.py", line 274, in read
return self._buffer.read(size)
File "/usr/lib/python3.5/_compression.py", line 68, in readinto
data = self.read(len(byte_view))
File "/usr/lib/python3.5/gzip.py", line 461, in read
if not self._read_gzip_header():
File "/usr/lib/python3.5/gzip.py", line 404, in _read_gzip_header
magic = self._fp.read(2)
File "/usr/lib/python3.5/gzip.py", line 91, in read
self.file.read(size-self._length+read)
File "/usr/lib/python3.5/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte