这是indexloc提供的服务,不要输入任何密码
Skip to content

Add the non-in-place counterpart of Batch.to_torch #1116

@dantp-ai

Description

@dantp-ai

Currently Batch.to_torch is a in-place operation. A non-in-place counterpart to it should be implemented that returns a new Batch (cf. similar methods like Batch.to_numpy).

Note that the two methods should be named appropriately according to naming conventions in the existing codebase, i.e. in-place methods have a _ appended to their name.

Metadata

Metadata

Assignees

Labels

breaking changesChanges in public interfaces. Includes small changes or changes in keysenhancementFeature that is not a new algorithm or an algorithm enhancement

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions