Skip to content

torch.tensor and CUDA #6985

@Daulbaev

Description

@Daulbaev

It seems that torch.tensor with device=torch.device('cuda') can't work with numpy arrays:

t = torch.tensor(np.array([5., 5., 5.]), device=torch.device('cuda'))
t.device # returns 'cpu'

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