From 75f683eec64b7a88039e6f8585388d6e42f8cf41 Mon Sep 17 00:00:00 2001 From: Matthew Brulhardt Date: Tue, 25 Feb 2020 17:16:29 -0500 Subject: [PATCH] [rllib] Fix error in shape calculation. (#7301) --- rllib/models/catalog.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rllib/models/catalog.py b/rllib/models/catalog.py index 4fd864fde..881f5299d 100644 --- a/rllib/models/catalog.py +++ b/rllib/models/catalog.py @@ -229,6 +229,7 @@ class ModelCatalog: else: all_discrete = False size += np.product(action_space.spaces[i].shape) + size = int(size) return (tf.int64 if all_discrete else tf.float32, (None, size)) elif isinstance(action_space, gym.spaces.Dict): raise NotImplementedError(