JiahuiYu / neuralgym

Deep Learning Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error in running training code for generative image inpainting training code

chandni-dev opened this issue · comments

2023-06-18 07:23:12.649587: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/nvidia/lib:/usr/local/nvidia/lib64
2023-06-18 07:23:12.652543: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/nvidia/lib:/usr/local/nvidia/lib64
2023-06-18 07:23:12.652586: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
File "/content/drive/MyDrive/geninpaint_code1/train.py", line 5, in
import neuralgym as ng
File "/usr/local/lib/python3.10/dist-packages/neuralgym/init.py", line 27, in
from . import callbacks
File "/usr/local/lib/python3.10/dist-packages/neuralgym/callbacks/init.py", line 3, in
from .hyper_param_scheduler import HyperParamScheduler
File "/usr/local/lib/python3.10/dist-packages/neuralgym/callbacks/hyper_param_scheduler.py", line 6, in
from ..ops.summary_ops import scalar_summary
File "/usr/local/lib/python3.10/dist-packages/neuralgym/ops/init.py", line 4, in
from . import layers
File "/usr/local/lib/python3.10/dist-packages/neuralgym/ops/layers.py", line 93, in
activation_fn=None, w_init=tf.contrib.layers.xavier_initializer_conv2d(),
AttributeError: module 'tensorflow' has no attribute 'contrib'

commented

same error, have you found any solution?

Make sure that you are using the correct version of Tensorflow - versions over 2.0 do not work as the 'contrib' method was deprecated in version 2.0. https://stackoverflow.com/questions/55870127/module-tensorflow-has-no-attribute-contrib