What's a tensor?
A multi-dimensional array used to store data, like a list or matrix.
What command imports PyTorch?
import torch
What library helps us view images in Colab?
matplotlib.pyplot
What tool do we use to label tomato images?
LabelImg
What shape would a batch of 10 RGB images (32x32) have in tensors?
Hint: (x, x, x, x)
(10, 3, 32, 32)
What’s the shape of a 2D tensor with 3 rows and 4 columns?
Hint: print(tensor.shape)
(3, 4)
What does torch.tensor([1, 2, 3]) create?
A 1D tensor (vector) with values [1, 2, 3]
What are the RGB channels?
Red, Green, and Blue — the 3 color channels in an image
What format are annotations saved in using LabelImg?
Pascal VOC format (.xml files)
What is the difference between train, val, and test sets?
train: learns; val: tunes; test: evaluates final performance
What does .unsqueeze(0) do to a 2D tensor?
a 2D tensor?It adds a new dimension at position 0, turning a (2D) tensor into 3D.
What does torch.rand(3,3) generate?
A 3x3 tensor with random values between 0 and 1
Why is it important to shuffle your training data?
To prevent the model from learning the order of the data instead of the actual patterns.
What does XML stand for?
Extensible Markup Language
What’s the difference between a list and a tensor?
A list is a basic Python container, while a tensor is a multi-dimensional array used for numerical computations in libraries like PyTorch.
What's the difference between a vector and a matrix?
A vector is 1D, a matrix is 2D (has rows and columns).
What does nn.Conv2d do?
Applies convolution filters over image data
What is a kernel in the context of image analysis?
A small matrix used during a convolution to detect patterns like edges or textures in an image.
What does pandas help us do with XML files?
Convert data to a DataFrame or CSV for use in ML models
What Python library do we use for bounding box drawing?
PIL.ImageDraw or OpenCV
How do you calculate the mean along columns in a 2D tensor?
Use .mean(dim=0)
Why do we need to convert tensors to .float() sometimes?
To perform operations like .mean() that require floating point numbers
What does padding=1 do during convolution?
convolution?It adds a 1-pixel border so output size stays the same as input
What’s one advantage of converting to CSV format?
Easier to read, analyze, and use in model pipelines
Name one practical use of image classification in real life.
Examples: Self-driving cars, medical scans, facial recognition, etc.