Does the input layer of the model flatten the 28x28 pixel image into a 1D array of 784 elements?
Yes, the model uses nn.Flatten() to reshape the 28x28 pixel image into a 1D array of 784 elements for processing by the fully connected layers.
Yes, however in such the case the model will produce random outputs, as the network has not been trained to recognize any patterns from the data.
The CrossEntropyLoss function was used to train the model because it is suitable for multi-class classification tasks like digit classification. It measures the difference between the predicted probabilities and the true class labels, helping the model learn to make accurate predictions.