/189-PytorchTF

Primary LanguageJupyter Notebook

Week 8: Using TensorFlow and PyTorch

Welcome to the assignment for PyTorch/TensorFlow Tutorial in EE16ML. This repository and the contained files have been created by team DSS, consisting of Amanda Ma, Kevin Miao, Sandeep Sainath and Youngli Hong.

Pre-requisites

Before you start this assignment, we assume the following pre-requisite knowledge:

  • CS61A and CS61B or any similar programming experience

    • Object-Oriented Programming
    • Data Structures and Runtime Complexity
    • Proficiency in Python
  • EE16A/B or any similar linear algebra or introductory machine learning knowledge

  • For this assignment, we assume that you are up-to-speed with all the material including week 8. Specifically, we assume that you have completed the following modules and their respective theoretical knowledge in week 8:

  • CNNs

  • Using Pre-Trained Models

  • Importing Datasets and Augmentation (Optional)

Environment Set Up

For this module, we will be both working with DataHub/Jupyter Notebook. Please refer to this link to get more information on how to run Jupyter locally. Additionally, we will also be using Google Colab to use GPUs to train our models. If you are using Google Colab, make sure to log in on with your bMail and follow the prompts until you see an orange window containing a 'Welcome to Colab' notebook. The use should be pretty intuitive and similar to Jupyter Notebook.

Running GPU (Google Colab)

  • Open notebook
  • Click on Runtime in the menu bar
  • Change Runtime to GPU
  • Save

Learning Objectives

After this module you should:

  1. get an intuition of the differences between the two libraries.
  2. transition between programming, math and theory, specifically, the different optimizations and gradients.
  3. load and augment data.
  4. independently use any of the libraries to implement neural models of choice.
  5. be able to effectively debug and read through documentation.
  6. get some sense of residual nets are implemented on a basic level.

We will also be covering:

  • connecting assignment to industry
  • ethical considerations
  • show how small perturbations mess up your accuracy

As part of our curriculum, we will also be including ethics questions throughout the assignments.

1 : Since there is no other group covering the data loading and data augmentation, we will be covering it shortly.

Module Structure

The module will consists of:

  • slide deck
  • lecture notes
  • assignments
    • Introduction to PyTorch and TF
    • PyTorch/TensorFlow Assignment
    • Capstone Project

You are expected to read through the notes and the slide deck before starting the assignments. The notes will indicate when you can take a certain assignments. At the end, you will be able to test whether you retained enough information to be at passing level through taking the quiz.

File Structure

  • slides35.pdf : Slides
  • notes35.pdf : Notes
  • Assignments
    • Assignment 1
      • 1a: assignment1b.ipynb Introduction to TensorFlow
      • 1b: assignment1a.ipynb Introduction to PyTorch
    • Assignment 2
      • 2a: assignment2a.ipynb Fun with debugging and toy models: TensorFlow
      • 2b: assignment2b.ipynb Fun with debugging and toy models: PyTorch
    • 3: Final_Project Capstone Project: Fracture Classification
    • Q: final_quiz.pdf Quiz
  • Solutions have been appended with a _SOL