Open isaacncz opened 2 years ago
我尝试在 MIR 和 UR 环境中加载到稳定基线 3。似乎库无法迭代observation_space.spaces.items()。向遇到此问题的任何人寻求帮助
[File ~/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py:256, in CombinedExtractor.__init__(self, observation_space, cnn_output_dim) ]()[253](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=252)[ extractors = {} ]()[255](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=254)[ total_concat_size = 0 --> ]()[256](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=255)[ for key, subspace in observation_space.spaces.items(): ]()[257](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=256)[ if is_image_space(subspace): ]()[258](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=257) extractors[key] = NatureCNN(subspace, features_dim=cnn_output_dim) [AttributeError: 'Box' object has no attribute 'spaces']()
Hello, do you want to use the HER algorithm in SB3? I have also encountered this problem and it seems that there is no way to solve it.
i tried loading in both MIR and UR environment to Stable Baseline3. It seems like the library wasn't able to iterate the observation_space.spaces.items(). Looking for help from anyone experience with this issue
[File ~/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py:256, in CombinedExtractor.__init__(self, observation_space, cnn_output_dim) ]()[253](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=252)[ extractors = {} ]()[255](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=254)[ total_concat_size = 0 --> ]()[256](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=255)[ for key, subspace in observation_space.spaces.items(): ]()[257](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=256)[ if is_image_space(subspace): ]()[258](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=257) extractors[key] = NatureCNN(subspace, features_dim=cnn_output_dim) [AttributeError: 'Box' object has no attribute 'spaces']()