Skip to content
ml-recall

#autograd

16 questions from Neural Network Basics, Training Deep Networks, Deep Learning Frameworks, PyTorch

Timed test

16 questions · 16 min · score and explanations at the end

Take a test
Q 1 / 16Score 0 / 0

Question 1: Single choice

mediumAI-checkedNeural Network Basics

What does this code print?

import torch
x = torch.tensor([-1.0, 0.0, 2.0], requires_grad=True)
torch.relu(x).sum().backward()
print(x.grad)
Choose one option