Experiment - Reshaping (view, reshape, squeeze, unsqueeze)
Problem:You have a tensor representing a batch of images with shape (32, 3, 28, 28). You want to prepare this tensor for a fully connected neural network by flattening each image into a vector. Currently, the tensor shape is not compatible with the network input.
Current Metrics:Tensor shape before reshaping: torch.Size([32, 3, 28, 28])
Issue:The tensor shape is 4D, but the fully connected layer expects 2D input (batch_size, features). Without reshaping, the model will raise an error.