# cs230-stanford/cs230-code-examples

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/cs230-stanford-cs230-code-examples).**

4,218 stars · 1,020 forks · Python · other

## Links

- GitHub: https://github.com/cs230-stanford/cs230-code-examples
- awesome-repositories: https://awesome-repositories.com/repository/cs230-stanford-cs230-code-examples.md

## Topics

`computer-vision` `natural-language-processing` `pytorch` `tensorflow`

## Description

This repository provides structured code examples and project templates designed for classroom instruction in machine learning and neural networks. It offers reference implementations of deep learning models for both computer vision and natural language processing tasks, built using PyTorch as the core framework.

The codebase is organized as a modular project template with separate directories for data handling, model definitions, and training scripts, promoting reusability and clarity. It includes predefined pipelines for image classification and text processing, along with a command-line interface for initiating training with customizable hyperparameters. Checkpoint-based model persistence allows training to be resumed, and a separate evaluation script computes accuracy and loss on held-out test data.

The examples cover training vision models for image classification and NLP models for text processing, with configuration-driven experiment setup to manage hyperparameters and dataset paths. The documentation and code are structured to support academic instruction in deep learning concepts.

## Tags

### Education & Learning Resources

- [ML Teaching Resources](https://awesome-repositories.com/f/education-learning-resources/ml-teaching-resources.md) — Supports classroom teaching of machine learning and neural networks with ready-to-use code examples and project structures.
- [ML Teaching Resources](https://awesome-repositories.com/f/education-learning-resources/academic-resources/ml-teaching-resources.md) — Provides structured code examples and project templates designed for classroom instruction in machine learning.
- [Deep Learning Education](https://awesome-repositories.com/f/education-learning-resources/deep-learning-education.md) — Provides reference implementations and structured project templates for learning deep learning concepts.
- [PyTorch Deep Learning Examples](https://awesome-repositories.com/f/education-learning-resources/deep-learning-education/deep-learning-platforms/pytorch-deep-learning-examples.md) — Ships educational PyTorch examples for training vision and NLP deep learning models.
- [Deep Learning Frameworks](https://awesome-repositories.com/f/education-learning-resources/educational-resources/systems-applied-computing/machine-learning-education/deep-learning-frameworks.md) — Provides educational PyTorch implementations for vision and NLP deep learning tasks.
- [NLP Model Examples](https://awesome-repositories.com/f/education-learning-resources/use-case-examples/generative-model-examples/nlp-model-examples.md) — Ships reference implementations for training NLP models on text classification and processing tasks.

### Artificial Intelligence & ML

- [Computer Vision Training](https://awesome-repositories.com/f/artificial-intelligence-ml/computer-vision-training.md) — Trains image classification and visual data analysis models using provided code examples and frameworks.
- [Deep Learning Code Libraries](https://awesome-repositories.com/f/artificial-intelligence-ml/deep-learning-code-libraries.md) — Provides reference implementations of deep learning models for computer vision and natural language processing tasks.
- [Vision Model Training](https://awesome-repositories.com/f/artificial-intelligence-ml/model-training-frameworks/vision-model-training.md) — Trains image classification models using structured code for training and evaluation. ([source](https://cdn.jsdelivr.net/gh/cs230-stanford/cs230-code-examples@master/README.md))
- [Training Pipelines](https://awesome-repositories.com/f/artificial-intelligence-ml/natural-language-processing/training-pipelines.md) — Builds text processing pipelines and language models for text generation using reference implementations.
- [PyTorch Training Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/pytorch-training-frameworks.md) — Uses PyTorch as the core deep learning framework for defining, training, and evaluating neural network models.
- [NLP Training Toolkits](https://awesome-repositories.com/f/artificial-intelligence-ml/pytorch-training-frameworks/nlp-training-toolkits.md) — Trains natural language processing models using structured code for training and evaluation. ([source](https://cdn.jsdelivr.net/gh/cs230-stanford/cs230-code-examples@master/README.md))
- [NLP Model Training Examples](https://awesome-repositories.com/f/artificial-intelligence-ml/pytorch-training-frameworks/nlp-training-toolkits/nlp-model-training-examples.md) — Provides PyTorch-based reference implementations for training NLP models on text data.
- [File-Based Configurations](https://awesome-repositories.com/f/artificial-intelligence-ml/model-parameter-configurations/structured-experiment-configurations/file-based-configurations.md) — Controls hyperparameters and dataset paths through external configuration files.

### Part of an Awesome List

- [Computer Vision Models](https://awesome-repositories.com/f/awesome-lists/ai/computer-vision-models.md) — Provides example code for building and training image classification and visual data analysis models.
- [Neural Networks and Deep Learning](https://awesome-repositories.com/f/awesome-lists/ai/neural-networks-and-deep-learning.md) — Constructs and trains neural network architectures for computer vision and natural language processing tasks. ([source](https://cs230-stanford.github.io/))

### Data & Databases

- [Vision and NLP Pipelines](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-transformation/text-nlp-preprocessing/vision-and-nlp-pipelines.md) — Offers ready-to-use data loading and preprocessing pipelines for image classification and text processing.

### Software Engineering & Architecture

- [Project Structure Organization](https://awesome-repositories.com/f/software-engineering-architecture/project-structure-organization.md) — Organizes code into separate directories for data, models, and training scripts to promote reusability.

### Development Tools & Productivity

- [Training CLIs](https://awesome-repositories.com/f/development-tools-productivity/command-line-interfaces/training-clis.md) — Provides a CLI entry point to initiate model training with customizable hyperparameters.

### Testing & Quality Assurance

- [Test Set Inference Evaluators](https://awesome-repositories.com/f/testing-quality-assurance/model-testing/test-set-inference-evaluators.md) — Includes a separate script to compute accuracy and loss on held-out test data after training.
