tencent-ailab / hifi3dface

Code and data for our paper "High-Fidelity 3D Digital Human Creation from RGB-D Selfies".
Other
774 stars 153 forks source link

Testing compat Tensorflow 2 upgrade #19

Open arpu opened 3 years ago

arpu commented 3 years ago

Hello,

testing upgrade the source for Tesorflow 2.x first test is using the Tensorflow compat.v1

both samples rgbd and rgb with BMF works

BMF False still breaks

arpu commented 3 years ago
2020-11-27 16:51:13.051740: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2020-11-27 16:51:13.051800: W tensorflow/stream_executor/cuda/cuda_driver.cc:312] failed call to cuInit: UNKNOWN ERROR (303)
2020-11-27 16:51:13.051833: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (scw-silly-williams): /proc/driver/nvidia/version does not exist
2020-11-27 16:51:13.052147: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-11-27 16:51:13.061959: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 1996250000 Hz
2020-11-27 16:51:13.062883: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55a074d15200 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-11-27 16:51:13.062967: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
1
2020-11-27 16:51:13.705312: W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at gather_nd_op.cc:47 : Invalid argument: indices[0,262143] = [0, -1, -1] does not index into param shape [1,512,512,3]
2020-11-27 16:51:13.705618: W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at gather_nd_op.cc:47 : Invalid argument: indices[0,131071] = [0, -1, -1] does not index into param shape [1,300,300,19]
Traceback (most recent call last):
  File "/root/models/mnt/testpakfork/tensorflow/python/client/session.py", line 1365, in _do_call
    return fn(*args)
  File "/root/models/mnt/testpakfork/tensorflow/python/client/session.py", line 1350, in _run_fn
    target_list, run_metadata)
  File "/root/models/mnt/testpakfork/tensorflow/python/client/session.py", line 1443, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0,262143] = [0, -1, -1] does not index into param shape [1,512,512,3]
     [[{{node GatherNd_1}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "step0_unwrapper.py", line 352, in <module>
    tf.compat.v1.app.run(main)
  File "/root/models/mnt/testpakfork/tensorflow/python/platform/app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "/root/models/mnt/testpakfork/absl/app.py", line 303, in run
    _run_main(main, args)
  File "/root/models/mnt/testpakfork/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "step0_unwrapper.py", line 312, in main
    front_seg_batch: info["seg"][0:1, ...],
  File "/root/models/mnt/testpakfork/tensorflow/python/client/session.py", line 958, in run
    run_metadata_ptr)
  File "/root/models/mnt/testpakfork/tensorflow/python/client/session.py", line 1181, in _run
    feed_dict_tensor, options, run_metadata)
  File "/root/models/mnt/testpakfork/tensorflow/python/client/session.py", line 1359, in _do_run
    run_metadata)
  File "/root/models/mnt/testpakfork/tensorflow/python/client/session.py", line 1384, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0,262143] = [0, -1, -1] does not index into param shape [1,512,512,3]
     [[node GatherNd_1 (defined at ../utils/unwrap_utils.py:74) ]]

Errors may have originated from an input operation.
Input Source operations connected to node GatherNd_1:
 truediv (defined at step0_unwrapper.py:166)    
 Reshape_9 (defined at ../utils/unwrap_utils.py:72)

Original stack trace for 'GatherNd_1':
  File "step0_unwrapper.py", line 352, in <module>
    tf.compat.v1.app.run(main)
  File "/root/models/mnt/testpakfork/tensorflow/python/platform/app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "/root/models/mnt/testpakfork/absl/app.py", line 303, in run
    _run_main(main, args)
  File "/root/models/mnt/testpakfork/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "step0_unwrapper.py", line 170, in main
    FLAGS.uv_size,
  File "../utils/unwrap_utils.py", line 215, in unwrap_img_into_uv
    uv_size,
  File "../utils/unwrap_utils.py", line 74, in warp_img_to_uv
    uv_map = tf.gather_nd(img_attrs, batch_uv_pos)
  File "/root/models/mnt/testpakfork/tensorflow/python/util/dispatch.py", line 201, in wrapper
    return target(*args, **kwargs)
  File "/root/models/mnt/testpakfork/tensorflow/python/ops/array_ops.py", line 4998, in gather_nd
    return gen_array_ops.gather_nd(params, indices, name=name)
  File "/root/models/mnt/testpakfork/tensorflow/python/ops/gen_array_ops.py", line 3762, in gather_nd
    "GatherNd", params=params, indices=indices, name=name)
  File "/root/models/mnt/testpakfork/tensorflow/python/framework/op_def_library.py", line 744, in _apply_op_helper
    attrs=attr_protos, op_def=op_def)
  File "/root/models/mnt/testpakfork/tensorflow/python/framework/ops.py", line 3485, in _create_op_internal
    op_def=op_def)
  File "/root/models/mnt/testpakfork/tensorflow/python/framework/ops.py", line 1949, in __init__
    self._traceback = tf_stack.extract_stack()

unwrap failed
arpu commented 3 years ago

plz let me know if you are interested in such update? and any hint for the failed .InvalidArgumentError error

ZhenyanSun commented 1 year ago

d in such update?

Have you solved this problem?Thanks for sharing

rezalahmi commented 1 year ago

Hi Thanks to this great job, I've made the environment and installed TensorFlow 2.6, but when I run the install.sh, it didn't work. Can I ask you whish version you use?

arpu commented 1 year ago

Hello, sorry i stopped an testing this, plz take it over

rezalahmi commented 1 year ago

sure, I've tried to run it on windows 10 and TensorFlow 2.6, just one issue, how do you create the rasterize_triangles_kernel.so file? I have some error on rasterize_triangles_grad.cc!!! output.txt

arpu commented 1 year ago

look like this could help https://github.com/tensorflow/tensorflow/issues/14632