Skip to content

Avoid using .size for pytorch compat #161

Closed
@asmeurer

Description

@asmeurer

Several places in the test suite use .size. But pytorch makes .size a method, and this is something that will not be changed any time soon (pytorch/pytorch#58741). Furthermore, it won't be changed in the compat library because we aren't wrapping the class. So any test that uses size will be unusable for the compat library implementation. We should create a size() helper that uses prod(x.shape), and only use x.size itself in the actual test for .size.

Metadata

Metadata

Assignees

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