Skip to content

jackyan540/cs181-homework3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cs181-homework3

Spring 2021 Machine Learning (CS 181) Homework 3

Problem Topics

Solutions contained in the personal-solutions folder

  1. Comparing predictions made with a maximum-likelihood estimation (MLE), a maximum a posterior estimator (MAP), and a full posterior predictive
  2. Calculating gradients for backpropagation with a simple multi-layer perceptron (MLP)
  3. Using PyTorch to implement neural networks for image classification

Code

Implementation contained in the code folder

problem1_4-Estimator-Plots.py

  • Plots and compares the distributions for MLE, MAP, and a full posterior predictive as each of 14 data points are gathered

problem3-PyTorch-Neural-Networks.ipynb

  • Referred to as T3_P3.ipynb in the specifications
  • Jupyter Notebook file containing specifications on implementing a Neural Network using PyTorch to classify images

problem 3_4-Neural-Network.py

  • Implementation of a Neural Network with 3 fully connected linear layers (with 1000 nodes in each hidden layer) using ReLU activation functions

problem3_7-Neural-Network.py

  • Implementation of a Neural Network with 4 fully connected linear layers (with either 4000 or 5000 nodes in each hidden layer) using ReLU activation functions