Question 1: Short answer
hardAI-checkedSegmentationA two-pixel signal is upsampled by linear interpolation:
import torch
import torch.nn.functional as F
x = torch.tensor([[[0.0, 10.0]]]) # shape (1, 1, 2)
a = F.interpolate(x, scale_factor=2, mode="linear", align_corners=False)
b = F.interpolate(x, scale_factor=2, mode="linear", align_corners=True)
Both outputs have 4 values. The second value of a is and the second value of b
is .
Fill in every blank (hints in the boxes). Enter moves to the next blank.