Skip to content

Enhancement: Support Batch Input For Net Class #1270

@Jack251970

Description

@Jack251970

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions