Question: Here is a LetNet model: In [18]: # Model hyperparameters to consider, we just tune output_channel in this homework lrs=[0.9,1.5] hidden_1=80 hidden_2 2=84 output_channel_1s=[4,6] output_channel_2s=[12,16]

Here is a LetNet model:

Here is a LetNet model: In [18]: \# Model hyperparameters to consider,

we just tune output_channel in this homework lrs=[0.9,1.5] hidden_1=80 hidden_2 2=84 output_channel_1s=[4,6]output_channel_2s=[12,16] \# Loss function loss_function =nn. CrossEntropyLoss() Question 2: Train the LeNet

In [18]: \# Model hyperparameters to consider, we just tune output_channel in this homework lrs=[0.9,1.5] hidden_1=80 hidden_2 2=84 output_channel_1s=[4,6] output_channel_2s=[12,16] \# Loss function loss_function =nn. CrossEntropyLoss() Question 2: Train the LeNet CNN model (50 pts) II In this question, you will write a few lines to train the LeNet you just build. This is similar to Homework 1. Here's the list of things that you need to implement. All of them can (should) be done using one line of code. Initialize the model with a set of hyperparameters Initialize the optimizer with the model's trainable parameters Set the model into the training mode For every batch of data: zero the gradient in the optimizer feed the input into the model compute the loss back propagate the loss update the optimizer Your model should obtain a test set accuracy of at least 0.85 in order to secure full points. A training procedure that is correct but yields an accuracy lower than 0.85 will receive 25 points. ]: random_seed =3407 torch.manual_seed(random_seed) torch.backends. cudnn. deterministic = True torch.backends. cudnn.benchmark = False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!