Skip to content
ml-recall

#chw

2 questions from Computer Vision Basics, PyTorch

Timed test

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

Take a test
Q 1 / 2Score 0 / 0

Question 1: Short answer

easyAI-checkedComputer Vision Basics

Sixteen colour images are loaded as NumPy arrays in height × width × channels order and batched for a PyTorch CNN:

import numpy as np

imgs = [np.zeros((120, 160, 3), dtype=np.uint8) for _ in range(16)]
batch = np.stack(imgs).transpose(0, 3, 1, 2)
print(batch.shape)

What shape is printed?

four numbers in order, e.g. (8, 1, 28, 28)