gin-config icon indicating copy to clipboard operation
gin-config copied to clipboard

module 'tensorflow_core.compat.v1.random' has no attribute 'set_seed'

Open AdoniaMbarebaki opened this issue 4 years ago • 3 comments

AdoniaMbarebaki avatar Jan 10 '20 16:01 AdoniaMbarebaki

TensorFlow backend. Traceback (most recent call last): File "Adonia5.py", line 297, in gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=MEMORY_FRACTION) AttributeError: module 'tensorflow' has no attribute 'GPUOptions' C:\CarlaProject\PythonAPI\examples>python Adonia5.py Using TensorFlow backend. WARNING:tensorflow:From C:\Users\Hp\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\compat\v2_compat.py:88: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version. Instructions for updating: non-resource variables are not supported in the long term Traceback (most recent call last): File "Adonia5.py", line 297, in tf.random.set_seed(1) AttributeError: module 'tensorflow_core.compat.v1.random' has no attribute 'set_seed', how do i solve this issue while using carla simulator to test reinforcement learning in autonomous cars

sguada avatar Jan 10 '20 17:01 sguada

It seems an error in your code.

sguada avatar Jan 10 '20 17:01 sguada

It seems an error in your code.

Thanks for the reply, am still getting Runtime errors while running carla simulator using the reinforcement learning code as shown below.

C:\CarlaProject\PythonAPI\examples>python Adonia5.py Using TensorFlow backend. WARNING:tensorflow:From C:\Users\Hp\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\compat\v2_compat.py:88: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version. Instructions for updating: non-resource variables are not supported in the long term WARNING:tensorflow:From C:\Users\Hp\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\ops\resource_variable_ops.py:1635: calling BaseResourceVariable.init (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version. Instructions for updating: If using Keras pass *_constraint arguments to layers. 2020-01-11 15:25:49.021818: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 Traceback (most recent call last): File "Adonia5.py", line 308, in env = CarEnv() File "Adonia5.py", line 113, in init self.client = carla.Client("localhost", 2000) RuntimeError: resolve: The requested name is valid, but no data of the requested type was found.: The requested name is valid, but no data of the requested type was found.

AdoniaMbarebaki avatar Jan 11 '20 13:01 AdoniaMbarebaki