Enhancement: Support Batch Input For Net Class
Author: Jack251970Created Jul 15, 2025Updated Jul 15, 2025
When we have environment space like this:
self.observation_space = gym.spaces.Dict({
'A': gym.spaces.Box(low=0, high=1, shape=(1,), dtype=np.float32),
'B': gym.spaces.Box(low=0, high=1, shape=(1,), dtype=np.float32),
'C': gym.spaces.Box(low=0, high=1, shape=(1,), dtype=np.float32),
})I found tianshou.utils.net.common.Net cannot work since it just only supports these two types as input: obs: np.ndarray | torch.Tensor,, I wonder if we can also add support for Batch?
Source: thu-ml/tianshou