mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
[rllib] Fix error in shape calculation. (#7301)
This commit is contained in:
parent
f14b6e477b
commit
75f683eec6
1 changed files with 1 additions and 0 deletions
|
@ -229,6 +229,7 @@ class ModelCatalog:
|
||||||
else:
|
else:
|
||||||
all_discrete = False
|
all_discrete = False
|
||||||
size += np.product(action_space.spaces[i].shape)
|
size += np.product(action_space.spaces[i].shape)
|
||||||
|
size = int(size)
|
||||||
return (tf.int64 if all_discrete else tf.float32, (None, size))
|
return (tf.int64 if all_discrete else tf.float32, (None, size))
|
||||||
elif isinstance(action_space, gym.spaces.Dict):
|
elif isinstance(action_space, gym.spaces.Dict):
|
||||||
raise NotImplementedError(
|
raise NotImplementedError(
|
||||||
|
|
Loading…
Add table
Reference in a new issue