Skip to content

I think the .batch_shape should be equivalent to .tensor.shape or .tensor.batch_shape for graphs. #269

@josephdviviano

Description

@josephdviviano
          I think the `.batch_shape` should be equivalent to `.tensor.shape` or `.tensor.batch_shape` for graphs.

If so, why do we need this setter for the batch_shape?
My suggestion is:

@property
def batch_shape(self) -> tuple[int, ...]:
    return tuple(self.tensor.shape)[: -len(self.state_shape)]

Originally posted by @hyeok9855 in #252 (comment)

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