Skip to content
ml-recall

#squeeze

1 question from PyTorch

Timed test

1 question · 1 min · score and explanations at the end

Take a test
Q 1 / 1Score 0 / 0

Question 1: Short answer

mediumAI-checkedPyTorch
x = torch.rand(1, 1, 1, 10)
a = x.squeeze()
b = x.squeeze(0)

a has shape (10,). What is the shape of b?

Three dimensions, e.g. (2, 3, 4)