Skip to content

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

@saleml

Description

@saleml

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

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