Question: You need to implement the forward pass and backward pass for Linear, ReLU, Sigmoid, MSE loss, and BCE loss in the attached mip.py file. We

You need to implement the forward pass and backward pass for Linear, ReLU, Sigmoid, MSE loss, and BCE loss in the attached mip.py file. We provide three example test cases test.py, test2.py, test3.py. We will test your implementation with other hidden test cases, so please create your own test cases to make sure your implementation is correct. Extra instructions: 1. Please use Python version 3.7 and PyTorch version 1.7.1. We recommend you use Miniconda the manage your virtual environment. We will put your mip.py file under the same directory of the hidden test scripts and use the command python hiddenTestScriptName.py to check your implementation. So please make sure the file name is mip.py and it can be executed with the example test scripts we provided. 3. You are not allowed to use PyTorch autograd functionality in your implementation. 4. Be careful about the dimensionality of the vector and matrix in PyTorch. It is not necessarily follow the Math you got from part 1.
ReplyForward
Add reaction

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 Programming Questions!