Experiment - Flatten layer
Problem:You have a simple neural network for image classification using PyTorch. The model uses convolutional layers followed by a fully connected layer. However, the model throws an error when connecting the convolutional output to the fully connected layer because the tensor shape is not flattened.
Current Metrics:Training accuracy: 60%, Validation accuracy: 58%, Model does not train properly due to shape mismatch error.
Issue:The model lacks a Flatten layer to convert the multi-dimensional tensor output from convolutional layers into a 1D vector required by the fully connected layer.