taehoonlee / tensornets

High level network definitions with pre-trained weights in TensorFlow
MIT License
1k stars 184 forks source link

Model load issue #2

Closed miha-skalic closed 6 years ago

miha-skalic commented 6 years ago

Hello,

I was trying to test your code and got stuck on loading models. See full log:

Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:53:06) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> import tensornets as nets
>>> import numpy as np
>>> 
>>> print(tf.__version__)
1.3.0
>>> print(np.__version__)
1.13.3
>>> 
>>> inputs = tf.placeholder(tf.float32, [None, 224, 224, 3])
>>> outputs = tf.placeholder(tf.float32, [None, 50])
>>> model = nets.Inception4(inputs, is_training=True, classes=50)
>>> 
>>> loss = tf.losses.softmax_cross_entropy(outputs, model)
>>> train = tf.train.AdamOptimizer(learning_rate=1e-5).minimize(loss)
>>> 
>>> with tf.Session() as sess:
...     nets.pretrained(model)
... 
2017-11-15 21:14:22.616901: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-11-15 21:14:22.616976: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-11-15 21:14:22.617005: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-11-15 21:14:22.767544: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-11-15 21:14:22.767871: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 0 with properties: 
name: GeForce GTX 1080 Ti
major: 6 minor: 1 memoryClockRate (GHz) 1.582
pciBusID 0000:01:00.0
Total memory: 10.91GiB
Free memory: 355.38MiB
2017-11-15 21:14:22.900139: W tensorflow/stream_executor/cuda/cuda_driver.cc:523] A non-primary context 0xbea1700 exists before initializing the StreamExecutor. We haven't verified StreamExecutor works with that.
2017-11-15 21:14:22.900342: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-11-15 21:14:22.900694: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 1 with properties: 
name: GeForce GTX 1080 Ti
major: 6 minor: 1 memoryClockRate (GHz) 1.582
pciBusID 0000:02:00.0
Total memory: 10.91GiB
Free memory: 400.44MiB
2017-11-15 21:14:22.900850: I tensorflow/core/common_runtime/gpu/gpu_device.cc:976] DMA: 0 1 
2017-11-15 21:14:22.900869: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 0:   Y Y 
2017-11-15 21:14:22.900881: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 1:   Y Y 
2017-11-15 21:14:22.900899: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:01:00.0)
2017-11-15 21:14:22.900914: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:1) -> (device: 1, name: GeForce GTX 1080 Ti, pci bus id: 0000:02:00.0)
Traceback (most recent call last):
  File "/shared/miha/programs/miniconda3/lib/python3.5/site-packages/numpy/lib/format.py", line 640, in read_array
    array = pickle.load(fp, **pickle_kwargs)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb1 in position 0: ordinal not in range(128)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/shared/miha/py_homebrew/tensornets/pretrained.py", line 49, in pretrained
    __load_dict__[model_name](scope)
  File "/shared/miha/py_homebrew/tensornets/pretrained.py", line 101, in load_inception4
    return load_weights(scopes, weights_path)
  File "/shared/miha/py_homebrew/tensornets/utils.py", line 166, in load_weights
    values = data['values']
  File "/shared/miha/programs/miniconda3/lib/python3.5/site-packages/numpy/lib/npyio.py", line 233, in __getitem__
    pickle_kwargs=self.pickle_kwargs)
  File "/shared/miha/programs/miniconda3/lib/python3.5/site-packages/numpy/lib/format.py", line 646, in read_array
    "to numpy.load" % (err,))
UnicodeError: Unpickling a python object failed: UnicodeDecodeError('ascii', b'\xb1\xe0\xd7\xad\xdbf\x93\xae\xdcS\x90\xbe\x1d\x8f!?\x81\xdd^\xbf\x9a`\x9f=di\xae\xae \x07\x95.\xec\xcc\xc4\xbd\xa93\xaa\xae\x9d\xac\xef\xbd\xf1H<<\xa4,K?mz\xd8=RP\xcb.\xae\xad\xe1=ML\xa5.\x1e\x91\xff\xaeL\x11\xd4\xbe\xe2\xaa\xa0\xae\xd2\xeb\xa7\xbe\x84;\xb2>(\x1c\x02\xaf\x11\n\x00\xael\\\x88>\xea-Z\xbd@\'\x0f\xbdQ\x02\xb5\xae\x81n\xa5\xbe\xa5\xddU\xab"\xf8\x00/Z1\x92=v\xab\xb3.\x85\x06\xb2\xae|i\xf1\xbc\x93\xb5I?\x9c\x8b\x86\xbf\x873>=\xb9\xb9\x94\xaeQ!\x10\xaf\x00t>\xbe\xba\x80\x1c.\xa6F\x8e>\xa5\xb6\x01>\x15.S?\x01\xad]\xbe\x93\xe5\xe6.\xe3\xa2\xa2\xbe\xc2\xc7\x9c.,\xec\x10\xaf\xa5\x07\xd4=\x1e\x07\xba\xae\x8bW\x92>\x0e3h\xbe\xf3w\n\xaf\xd2s\'\xaf\x1e\xbf\x92\xbd\xa8\x82\xb8\xbd#\x12\xc6\xbc\xb9\xa2\xa1\xae\xad"t=\xae\x82G/\xb1L\xb3.\x19\xa8|\xbd<\x8f\xbb.\xaaE\x89\xae\xaco\x9c>i\x1b\x9c>\xde\x8c\x17\xbf\xa1k\x7f\xbd\xea\x13\xaa\xaet\x95^\xaf\xd0\x04\x04\xbex\xc2\x12\xafr\x08b\xbey\xe6\xb7\xbd\x1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\xae\xd6c]>\x8e4\xa1\xac\t\xf9\x88=s"\xbe\xbe\x92s\xd3\xaen%\xf3\xaew\x9fe\xbe+\xb6\xa2=\xf1OI\xbc\x1en\x00\xaf\x13\x05\x85>\x8a%\x83.\xff\x99\xdb\xac\x98S\xcc\xbb', 0, 1, 'ordinal not in range(128)')
You may need to pass the encoding= option to numpy.load

I'm using the latest version of tensornets. Any clue why this is happening?

taehoonlee commented 6 years ago

The problem is solved by adding the encoding argument (see updates). The pickle files generated on Python 2 seem to be encoded as bytes. Thank you for reporting the issue, @miha-skalic!