What does this return?
import torch torch.relu(torch.tensor([-2.0, 0.0, 3.0]))
- tensor([0., 0., 3.])
- tensor([-2., 0., 3.])
- tensor([0., 1., 3.])
- tensor([2., 0., 3.])
ReLU computes max(0, x), so negatives become 0 and positives pass through.
Play AI & ML ▸