You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
the observation of my ENV is
self.observation_space = spaces.Box(
low=np.array([[float('-inf') for _ in range(26)]
for _ in range(self.obs_time // self.obs_delta_frequency)]),
high=np.array([[float('inf') for _ in range(26)]
for _ in range(0, self.obs_time // self.obs_delta_frequency)]))
its shape is like (timestep=60, feature=26)
When I run this code, I got error like this:
ValueError: The initializer passed is not valid. It should be a callable with no arguments and the shape should not be provided or an instance of tf.keras.initializers.*' and shape` should be fully defined.
But if I use PPO2, it runs normal
Code example
see above
Traceback (most recent call last):
Instructions for updating:
Colocations handled automatically by placer.
Traceback (most recent call last):
File "C:\Users\zkx74\Anaconda3\lib\site-packages\stable_baselines\trpo_mpi\trpo_mpi.py", line 138, in setup_model
None, reuse=False, **self.policy_kwargs)
File "C:\Users\zkx74\Anaconda3\lib\site-packages\stable_baselines\common\policies.py", line 681, in __init__
layer_norm=False, feature_extraction="mlp", **_kwargs)
File "C:\Users\zkx74\Anaconda3\lib\site-packages\stable_baselines\common\policies.py", line 427, in __init__
layer_norm=layer_norm)
File "C:\Users\zkx74\Anaconda3\lib\site-packages\stable_baselines\common\tf_layers.py", line 143, in lstm
weight_x = tf.get_variable("wx", [n_input, n_hidden * 4], initializer=ortho_init(init_scale))
File "C:\Users\zkx74\Anaconda3\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 1479, in get_variable
aggregation=aggregation)
File "C:\Users\zkx74\Anaconda3\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 1220, in get_variable
aggregation=aggregation)
File "C:\Users\zkx74\Anaconda3\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 547, in get_variable
aggregation=aggregation)
File "C:\Users\zkx74\Anaconda3\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 499, in _true_getter
aggregation=aggregation)
File "C:\Users\zkx74\Anaconda3\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 890, in _get_single_variable
raise ValueError("The initializer passed is not valid. It should "
ValueError: The initializer passed is not valid. It should be a callable with no arguments and the shape should not be provided or an instance of `tf.keras.initializers.*' and `shape` should be fully defined.
System Info
Describe the characteristic of your environment:
Describe how the library was installed: pip in anaconda env
GPU models and configuration: default tf-gpu
Python version 3.7
Tensorflow version 1.13.2
Versions of any other relevant libraries
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
the observation of my ENV is
self.observation_space = spaces.Box(
low=np.array([[float('-inf') for _ in range(26)]
for _ in range(self.obs_time // self.obs_delta_frequency)]),
high=np.array([[float('inf') for _ in range(26)]
for _ in range(0, self.obs_time // self.obs_delta_frequency)]))
its shape is like (timestep=60, feature=26)
When I run this code, I got error like this:
ValueError: The initializer passed is not valid. It should be a callable with no arguments and the shape should not be provided or an instance of
tf.keras.initializers.*' and
shape` should be fully defined.But if I use PPO2, it runs normal
Code example
see above
System Info
Describe the characteristic of your environment:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: