Codelet 1: PyTorch Basics

The due date for this codelet is Friday, Jan 31 at 11:59PM.

Introduction

The following is to help get you started working with PyTorch. You should draw on the textbook (Chapter 2) and the PyTorch documentation.

Outline

Your assignment

Your task is to:

  1. Download codelet1.zip from the course website and open it. You will find these instructions and codelet1.py which has scaffolding for you.
  2. Complete each of the exercises using the scaffolding provided in codelet1.py and include a file called codelet.pdf with your answer to the broadcasting question.

Grading

When assessing your code, satisfactory achievement is demonstrated, in part, by:

Exercises

For the exercises not mentioned below, you should find sufficient detail in their docstrings.

Explain broadcasting

Explain briefly (no more than 100 words) how broadcasting works with PyTorch. Provide concrete examples to ground your explanation.