System information
What is the top-level directory of the model you are using: ~/models/research/struct2depth
Have I written custom code (as opposed to using a stock example script provided in TensorFlow): N/A
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux 16.04
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below):1.4
Bazel version (if compiling from source): N/A
CUDA/cuDNN version:CUDA:8.0,cudnn:8.0-v6.0
GPU model and memory:GeForce GTX 12206MiB
Exact command to reproduce:python inference.py --input_dir ~/models/research/struct2depth/data --output_dir ~/models/research/struct2depth/output --model_ckpt ~/models/struct2depth/model/model.ckpt-56286 --file_extension png --depth --egomotion true
I try to set up:LC_ALL=en_US.UTF-8
But it has error:
File "inference.py", line 157, in _run_inference
joint_encoder=joint_encoder)
File "/home/launchx-500-16/models/research/struct2depth/model.py", line 166, in __init__
util.count_parameters()
File "/home/launchx-500-16/models/research/struct2depth/util.py", line 151, in count_parameters
format_number(shape.num_elements()))
File "/home/launchx-500-16/models/research/struct2depth/util.py", line 236, in format_number
locale.setlocale(locale.LC_ALL, 'en_US')
File "/usr/lib/python2.7/locale.py", line 581, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Exact command to reproduce
@tensorflowbutler
I have updated the format above.
I also have this problem, which has not been solved yet.
Changing line 236 in util.py
locale.setlocale(locale.LC_ALL, 'en_US') to locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
solves the problem for me.
Any update on this issue?
Edit: I managed to solve this, change line 60 from:
im_data = np.fromstring(gfile.Open(img_file).read(), np.uint8)
to
im_data = np.fromstring(gfile.Open(img_file, 'rb').read(), np.uint8)
Hi There,
We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing.
If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.
Most helpful comment
Changing line 236 in util.py
locale.setlocale(locale.LC_ALL, 'en_US')tolocale.setlocale(locale.LC_ALL, 'en_US.UTF-8')solves the problem for me.