akanazawa / hmr

Project page for End-to-end Recovery of Human Shape and Pose
Other
1.54k stars 395 forks source link

TypeError: `default_name` type (<type 'list'>) is not a string type. #69

Closed StatML closed 5 years ago

StatML commented 5 years ago

Hi, I met a TypeError when running the following command. I am using TF 1.12, Ubuntu 18.04. Does anyone know how to fix it? Thx!

python demo.py --img_path data/02796.jpg

Traceback (most recent call last): File "demo.py", line 147, in main(config.img_path, config.json_path) File "demo.py", line 121, in main model = RunModel(config, sess=sess) File "hmr/src/RunModel.py", line 62, in init self.build_test_model_ief() File "hmr/src/RunModel.py", line 82, in build_test_model_ief reuse=False) File "hmr/src/models.py", line 40, in Encoder_resnet with tf.name_scope("Encoder_resnet", [x]): File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 6223, in init % type(default_name)) TypeError: default_name type (<type 'list'>) is not a string type. You likely meant to pass this into the values kwarg.

sga8 commented 5 years ago

why this topic is closed?

A7ocin commented 5 years ago

Hi, did you solve this? @StatML

timctran commented 5 years ago

Using the TensorFlow documentation for tf.name_scope, I resolved the issue by prepending [x] with values=. That is change with tf.name_scope("Encoder_resnet", [x]): to with tf.name_scope("Encoder_resnet", values=[x]):. This error also occurs in a few places over in batch_lbs.py which I fixed in the same way.

alon1samuel commented 5 years ago

I also had to change it in Ubuntu 18.04 with Tensorflow-gpu==1.14.0. Apparently it's a problem with Tensorflow>=1.12

alon1samuel commented 5 years ago

Maybe this bug can be fixed for tensorflow-gpu>=1.12?