Question 1: Single choice
mediumAI-checkedPyTorchOn a machine with a GPU:
t = torch.rand(2, 3)
t.to("cuda")
model = nn.Linear(3, 1)
model.to("cuda")
print(t.device, next(model.parameters()).device)
What is printed?
1 question from PyTorch
1 question · 1 min · score and explanations at the end
On a machine with a GPU:
t = torch.rand(2, 3)
t.to("cuda")
model = nn.Linear(3, 1)
model.to("cuda")
print(t.device, next(model.parameters()).device)
What is printed?