Course Syllabus
Course Description
In this course, we will introduce neural networks as a tool for machine learning and function approximation. We will start with the fundamentals of how to build and train a neural network from scratch. We will work our way towards discussing state-of-the-art neural networks including networks that power applications like object recognition, image generation and large language models. Throughout the course we will keep a strong focus on the implications of these models and how to apply them responsibly.
Course Slack: https://join.slack.com/t/cs152neuralne-fop9003/shared_invite/zt-2ax94g9q8-Av_OBLyv2Lh63Om2WGWYRw
Course Survey: https://forms.gle/QaaKDcqpZL8ZvTAB7
Instructor

Prof. Gabe Hope (he/him)
Email: ghope@g.hmc.edu
Office: MacGregor 311
Office hours: Thursdays 3:30-5pm
About me
You can call me any combination of Prof./Professor/Dr. and Hope/Gabe. My full name is actually John Gabriel Hope.
I am originally from New York City
I have a Bachelor of Science (BS) in computer science and finance from Washington University in St. Louis.
I have a Master of Science (MS) from Brown University (This was actually the start of my Ph.D.)
I earned my Ph.D. from the University of California, Irvine advised by Erik Sudderth.
My research focuses on using neural networks to find interpretable structures in data. I mainly focus on image data, though I have also worked on analyzing motion-capture, audio and climate data among other things!
Grutors (and hours)
Hayley Walters
Office hours: Wednesdays 2:30-4pm (location TBA)
Rohan Subramanian
Office hours: Sundays 1-2:30pm (location TBA)
Topics covered
Linear and logistic regression
Gradient descent and optimization
Feature transforms and feed-forward networks
Performance tuning and analysis for neural networks
Convolutional neural networks
Regularization and normalization
Residual networks and large-scale architectures
Attention and transformers
Biases and fairness in machine learning
Textbook
Probabilistic Machine Learning by Kevin Murphy. Full text for book 1 and book 2 are available for free online.
Open door policy: If my door is open, feel free to stop in, say hi and ask questions about the course, research or any other academic issues. If the door is closed, feel free to knock. I often like to close my door to focus, but it does not always mean I am unable to talk. If I don’t answer promptly I am either out of office or in a meeting and am unable to talk. If in doubt, feel free contact me on slack. Note that I generally prefer to keep longer discussion of course materials to designated office hours.
Software and tools
VSCode (Optional)
Visual Studio Code is a free development environment developed by Microsoft. It is available for Mac, Windows and Linux, and provides convenient tools for working with Python, Git and Jupyter. It is what I use to develop the materials for this course, and it is what I would recommend using for homework assignments. This is completely optional however. You are welcome to use whatever environment you feel most comfortable with.
Here are resources for getting started:
Python
Assignments and projects in this course will be based on Python 3. We will be using the following packages throughout this course:
Numpy: The industry-standard Python library for working with vectors, matrices and general numerical computing.
Matplotlib: The most popular and widely supported library for data visualization in Python.
SciKit-Learn: A popular library for basic machine learning.
PyTorch: A deep learning library. Currently the most popular library for neural networks research and competitive with TensorFlow in terms of industry deployment.
You can find this course’s requirements file here. It will also be included in homework distributions. You can install the full set of packages using the command:
pip install -r requirements.txt
Jupyter
Most homework assignments will be distributed and submitted as Jupyter notebooks. Jupyterlab is included in the course requirements.txt file, but instructions for installing it are also available here. Once installed, you can launch a JupyterLab server locally on you computer using the command:
jupyter labThis will open the Jupyter Lab application in a web browser. From there you can navigate to the homework’s main.ipynb file. Resources and documentation for working with Jupyter notebooks are available here.
Latex (style) equations
Homework assignments will ask you to submit answers requiring mathematical derivations as typeset Latex-style equations. Latex equations are supported directly within Jupyter. To write an equation in a text/markdown cell, simply surround the equation with $ symbols as: $y = x^2 + 1$, which produces the output: \(y=x^2 +1\). You can write block equation using double dollar-signs as $$y = x^2 + 1$$, which puts the equation on its own centered line.
An extensive reference for Latex equations is available here.
In general, only the final answer to such problems will be required to be submitted in this way, intermediate steps in derivations can be submitted separately as handwritten notes. To do this, scan or photograph (clearly!) the handwritten derivations and include them (ideally) as images in your notebook or as a separeate derivations.pdf file in the homework repository. You may also omit intermediate steps altogether, but this is not recommended as it may limit your ability to earn partial credit if your answer is incorrect.
Submitting PDFs to Gradescope
Each complete homework notebook should be submitted as a PDF file to Gradescope. This primarily where homeworks will be graded and where grades and regrade requests will be handeled. Jupyter notebooks can be converted to PDFs either through VSCode (instructions here), or via online tools such as this one.
Course GPU Server
We have a GPU server for this course that will be available to you for your final projects. (Thank you to our system administrator Tim Buchheim for setting this up!). The server is located at teapot.cs.hmc.edu (named for the Utah teapot). We will discuss how to allocate resources on this machine at the start of the course project. You will not need GPU access for most homework assignments.
Course grades
I will be assigning course grades based on three categories: homework assignments, final project and participation. The breakdown of how the grade will be computed is:
Homework assignments (60% of course grade)
Frequency and deadlines: Homeworks will be assigned on a weekly basis throughout the semester, with the exception of weeks where final project checkpoints are due. Homeworks are assigned on Wednesdays and must be submitted on gradescope and Github by the end of the following Thursday (11:59pm Thursday).
Submission Homework assignments are submitted by uploading a solution PDF to Gradescope. You must convert your completed notebook to PDF using the CS152 conversion tool. This page will extract and separate the answers for each question. Please make sure to check that all answers are included before submitting the PDF to Gradescope. Incorrectly formatted submissions are subject to a 10% penalty. See further instructions under software and tools!
Late policy: Homeworks may be submitted up to 1 day late with no penalty (to Friday 11:59pm). Assignments submitted on time will recieve a 5 point bonus (up to 100 total points).
Drops: The lowest 2 homework scores will be dropped unconditionally. Your homework score will be computed as the average of the remaining scores. Please note that you should still try to complete every homework in this class. These drops are intended to cover normal unforseen circumstances such as minor illness, conference or clinic travel and job interviews, as well as to allow you to balance your work with other classes and take care of your mental health.
Extension policy: For situations such as extended illnesses, family emergencies, or other significant and unforeseen circumstances preventing you from working, I’m happy to work with you to try to find a way to give you the space you need while being able to come back to the course when you’re able. The best way to start this conversation is by directly emailing me (ghope@g.hmc.edu). To protect your privacy about the reasons for these circumstances and to ensure you get the support you need, I may ask you to reach out about this to your campus’ Division of Student Affairs, Dean of Students office, or your Student Disability Services coordinator to verify what kind of accommodation makes sense and to ensure you’re being supported across your other courses. If it’s more comfortable, you may also choose to reach out to any of these groups to reach out to me before contacting me yourself.
Participation (10% of course grade)
This course is not generally a discussion-based class, however there will be certain lectures with open-ended discussions throughout the semester. The participation grade will be based on the following factors:
Participation in open-ended discussion sessions during class
Contriubting to the learning environment by asking or answering questions during regular lectures
Following the guidelines for respectful discussion (as outlined in course policies)
Class attendance
Attending office hours outside class
Support provided to peers, e.g. by helping others debug or answering questions on Slack.
Earning a perfect participation grade will not require full marks for all of these criteria, and it is expected that most students will earn full credit for participation. A perfect participation grade will be earned by any student who: attends class regularly (> 80% of the time) and at least occasionally participates respectfully in class. Attending office hours is not strictly required, but if you miss class or are struggling to participate, I will assign bonus points to your participation grade for attending. If you have questions about your participation grade at any point, please contact me.
Final Project (30% of course grade)
The culmination of this course will be a final project completed in teams of 2-4 students. Full project description to follow. Your grade for the final project will depend on:
The strength of your team’s final presentation and write-up
Your strength as a team-member (determined by self, peer and instructor evaluations)
Initial project proposal
Mid-project check-ins
Students enter this class with highly varying backgrounds and prior experiences with neural networks, so I will help each team determine an appropriate scope for their project. Grades will be evaluated for each team individually based on how the team approached, analyzed and executed on the goals of the project. The relative technical sophistication of other teams projects will not be considered.
Letter grade assignments
As this course is still under active development I cannot yet guarantee exact cutoffs for each grade. Harvey Mudd does not impose expectations for the grade distribution, so every student that meets the requirements for a given grade will earn it. The following is the maximum cutoff of each letter grade, the actual cutoff for each grade may be lower that what is listed below:
>90%: A
>80%: B
>70%: C
>60%: D
As the semester progresses, I will update this guide to provide a clearer picture of how grades will be assigned.
Guidelines and policies
Course feedback
This is my first time teaching a college course, so I will need your help! I want to make sure that we go through the material at an appropriate pace and that concepts are presented in a clear and understandable way. To do this, I will be continuously soliciting feedback from you throughout the semester on both the lectures and assignments. I ask that you provide feedback honestly, but kindly. There are three mechanisms I will use for feedback:
In-class: In class we will use a thumbs-up, thumbs down system. When I ask if people are following the lecture you can put your thumb up to indicate that you feel you are understanding the material being presented, down to indicate that you are lost or the lecture is confusing, and sideways to indicate that you followed some parts, but not all. You are, of course, also encouraged to give verbal feedback if appropriate.
With homework: Each homework will include a link to a survey to give feedback on that week’s assignment and lectures. Submitting this form is a required part of the homework, but your answers will not be tracked or accounted for in grades. This gives you a chance to indicate any issues (or things you like) with the class.
General anonymous feedback: If you have an issue with the course that you would like me to be aware of, but do not want your name to be associated with, you can use this form to submit an anonymous issue. Please continue to remain constructive and kind when submitting feedback in this way.
Academic issues and wellness
My primary goal is for every student to understand the material to the best extent possible and hopefully enjoy learning the material at the same time. If at any point you are concerned about your grade or feel you are struggling for any reason I encourage you to reach out to me either via slack/email or during office hours. I will also try to reach out to you if I notice you are struggling with the material or are not on track to pass the class.
I also want you to prioritize your mental and physical well-being. The college has several resources that can help you with this. The academic deans (academicdeans@g.hmc.edu) can help you keep on top of your academic progress. The office of health and wellness (https://www.hmc.edu/health-wellness/) can help you with a wide range of physical and metal health issues. I encourage you to be proactive, if you are starting to feel anxious, overwhelmed or depressed seeking help early can be extremely valuable. If you are unsure where to go, I can help guide you to the appropriate resource. The Claremont Care Guide, provides a useful guide if you or someone you know is in urgent distress.
Accommodations
If you have a disability (for example, mental health, learning, chronic health, physical, hearing, vision, neurological, etc.) and expect barriers related to this course, it is important to request accommodations and establish a plan. Requests for accommodations must go through the Office of Accessible Education. I am happy to work with them to establish an appropriate plan for this course. I also encourage reaching out to them if you are unsure of your eligibility for accommodations, they can help determine what is appropriate for you.
Remember that requests for accommodations must be made each semester. If you are not already registered this process can take time and accommodations cannot be applied retroactively, so starting the process early is important.
Attendence
Attendence is strongly encouraged as it is beneficial for both your own learning and that of your peers who may learn from your knowledge and viewpoints. Not only is attendance reflected in your participation grade, it is also highly correlated with performance on exams and homework. That said, I understand that there are times where student may miss class for a variety of reasons. If you miss a class (or several) please contact me by email or slack and we can work out a plan to catch you up on the material. Up to 1 unexcused absence per month will not affect your participation grade, neither will excused absences due to illness, injury, etc.
Guidelines for respectful class discussion
The goal of in-class discussions to understand each others perspectives and to contribute to both our own learning and that of our peers. To make sure that in-class discussions are aligned with these goals please be mindful of the following guidelines:
Avoid judgment: Students enter this class with a variety of backgrounds, experience and viewpoints. Be positive and encouraging to your peers even if you feel they are incorrect. Strive to make sure those around you feel comfortable answering questions even if they are not completely sure of their answer and give opinions that they are not sure others will agree with. Remember that giving an answer different from what the instructor was looking for can lead to productive and informative discussions.
Allow everyone a chance to speak: We want to give every student a chance to participate in the class and in discussions. If you find yourself speaking, answering or asking questions far more than your peers, consider encouraging others to speak instead. Remember that in-class time is not your only opportunity to discuss this material and you are welcome to ask more questions in office hours.
Practice active listening: When having in-class discussions make sure to acknowledge the answers and opinions of others before offering your own. Avoid interrupting others. Your thoughts deserve to be heard and understood, so it’s important that we work together to make sure everyone’s contributions are considered.
Be kind: Do not use harsh or disparaging language in class. Avoid blame or speculation about other students. Aim to be charitable in your interpretations of other peoples words. Respect the boundaries set by others.
Be inclusive: Be respectful of everyone’s background and identity. Avoid making assumptions or generalizations based on someone’s (perceived) social group. Do not ask individuals to speak for their social group.
Collaboration policy
You are encouraged to discuss and collaborate on homework assignments with other students, but you must write-up all final answers on your own. This means you may:
Discuss published course materials and topics
Discuss approaches to problems with other students, including while working on the assignments (work in small groups).
Share helpful examples and resources with other students
Help other students with technical issues such as setting up GitHub and Python environments.
View another student’s code for the purpose of debugging small technical issues (exceptions, syntax errors etc.)
You may not:
Copy/paste another student’s completed answers to any problem or allow another student to copy/paste your answers
Share answers to completed problems with other students
Distribute or post online any assignments, problems and/or solutions.
Fail to acknowledge collaborators.
This collaboration policy is covered by the Harvey Mudd honor code and violations will be referred to the honor code board.
Each homework will have space for you to indicate who you discussed the assignment with. Please use the #team-matching channel on the course Slack to find study partners.
AI Policy
In this course we will be learning the fundamental tools for building large language models and chat AIs, such as ChatGPT. Therefore I encourage you to experiment with ChatGPT and it’s competitors during this course, but only for learning about concepts. You may not share any assignment materials with large language models including assignment questions, support code and your own answers. This includes AI-assisted code-helpers such as Github co-pilot and Google Gemini in Colab. Please disable these tools when working on class assignments.
Homeworks in this class are highly structured, in order to guide you through the often complex tools at the heart of deep learning. While I believe this structure is helpful for learning This makes the assignments particularly susceptible to AI-assisted academic dishonesty.
COVID Safety
College policy states that masks are no longer required indoors for the upcoming semester. I will not require masks in class, but students who prefer to continue wearing masks are should do so. If you are feeling sick please stay home and let me know so that I can provide you with the relevant course materials.
Final Project
As stated in the course grades section, this course will culminate in a final group project. More information about this project can be found on the project page.
External Resources
Useful resources for neural networks and deep learning (compiled by the wonderful Tony Clark).