# CS410/1411 Homework 8: Neural Networks ==**Due Date: 11/4/2025 at 11:59pm**== **Need help?** Remember to check out [Edstem](https://edstem.org/us/courses/85591) and our website for TA assistance. ![HW8BeginningPicture](https://hackmd.io/_uploads/BJoD7P19xe.jpg) ## Assignment Overview Welcome to Homework 8! You'll start this assignment by building a `logistic regression` model, then learn how to calculate gradients automatically and explore neural networks using the `PyTorch` library, gaining hands-on experience with the deep learning pipeline. Here's what you'll learn and explore: - Fundamentals of logistic regression - Backpropagation with PyTorch - Building basic neural networks with PyTorch ## Python Notebooks A **Python notebook** is an application that allows users to combine text, code, and visualizations, much like a traditional scientific lab notebook. This assignment is written in a Python notebook. In the file, we describe the tasks, and ask you to insert the code and run it to generate the requisite visualizations. Your handin should include the Python notebook file--modified--as well as your README, as always. ### Instructions for Downloading and Setting Up [Jupyter](https://docs.jupyter.org/en/latest/install/notebook-classic.html) Notebook To complete this assignment, you’ll need to have **Jupyter Notebook** installed on your computer. Follow the steps below based on your operating system (macOS or Windows). #### Option 1: Jupyter via VSCode #### 1. In VSCode, activate your CS410 environment ```bash source cs410_env/bin/activate ``` 2. Install Jupyter Notebook by typing: ```bash pip install notebook ipykernel ``` 3. Install the Python and Jupyter Extension: - Open VS Code. - Go to the Extensions view (Ctrl+Shift+X / Cmd+Shift+X). - Search for "Jupyter" and install the extension by Microsoft. Make sure "Python" is also installed 4. Open the folder/repo containing the stencil code. Be sure to select the environment as the Python Interpreter and select the kernel. **Option 2: Launch Jupyter Notebook Browser:** 1. Open the **Terminal** (macOS) app or **Command Prompt** (Windows) and activate your environment (same command as above) 3. install Jupyter Notebook by typing: ```bash pip install notebook ``` 2. Launch Jupyter Notebook. Your browser will open with the Jupyter Notebook interface: ```bash jupyter notebook ``` 3. Once Jupyter Notebook launches, navigate to the folder where you cloned the GitHub repository.Click the file to open and start modifying the code. ## Downloads This assignment will take place in a Python notebook file. Please click [here](https://classroom.github.com/a/IQvorXRE) to download the assignment code. :::info If you get a message "Running cells with 'cs410_env (Python 3.10.6)' requires the ipykernel package," please install the package. ::: ## Handin Your handin should contain: - all modified files, including comments describing the logic of your algorithmic modifications - a README, containing a brief overview of your implementation ### Gradescope Submit your assignment via Gradescope. To submit through GitHub, follow these commands: 1. `git add -A` 2. `git commit -m "commit message"` 3. `git push` Now, you are ready to upload your repo to Gradescope. *Tip*: If you are having difficulties submitting through GitHub, you may submit by zipping up your hw folder. ## Rubric | Component | Points | Notes | |-------------------|------|--------------------------------| | 1.1 Logistic Regression | 50 | Points awarded for correct implementation of `initialize_parameters`, `sigmoid`, `forward`, `predict`, `backward_propagation`, and `optimize`. | | 1.2 Gradient Descent | 10 | Points awarded for correct implementation of gradient descent with logistic regression| | MyMLP README Questions| 20 | Points awarded for responding to questions thoughtfully | | MyMLP Implementation | 20 | Points awarded for meeting criteria, partial credit awarded for lower accuracies. | :::success Congrats on submitting your homework. We are proud of you!! <p style="text-align: center;"> <img src="https://hackmd.io/_uploads/HySvEvJ9gx.jpg" alt="SunflowerHW8" /> </p> :::