Skip to content

Use torch.frombuffer instead of np.frombuffer #4552

@fmassa

Description

@fmassa

PyTorch recently introduced a torch.frombuffer method pytorch/pytorch#59077
We should use it to simplify our code whenever possible, instead of relying on alternatives like torch.from_numpy(np.frombuffer)).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions