Skip to main content
Ctrl+K
Optax  documentation - Home Optax  documentation - Home
  • ๐Ÿš€ Getting started
  • ๐Ÿ–ผ๏ธ Example gallery
    • Examples
      • Adversarial training
      • ResNet on CIFAR10 with Flax NNX and Optax.
      • Simple NN with Flax.
      • Freezing Parameters in Optax
      • Gradient Accumulation
      • Summary
      • L-BFGS
      • Linear assignment problem
      • Lookahead Optimizer on MNIST
      • Meta-Learning
      • MLP MNIST
      • Character-level Transformer on Tiny Shakespeare
      • Optimistic Gradient Descent in a Bilinear Min-Max Problem
      • Perturbed optimizers
    • Contrib Examples
      • Differentially private convolutional neural network on MNIST.
      • Using the Muon Optimizer in Optax
      • Reduce on Plateau Learning Rate Scheduler
      • Recreate AdeMAMix Rosenbrock Plot from Paper
      • Sharpness-Aware Minimization (SAM)
  • ๐Ÿ› ๏ธ Development

๐Ÿ“– Reference

  • Assignment problem
  • Optimizers
  • Transformations
  • Combining Optimizers
  • Optimizer Wrappers
  • Optimizer Schedules
  • Apply Updates
  • Perturbations
  • Projections
  • Losses
  • Utilities
  • Microbatching
  • ๐Ÿ”ง Contrib
  • ๐Ÿงช Experimental
  • .md

Examples

Examples#

This directory contains examples using the optax library.

  • Adversarial training
  • ResNet on CIFAR10 with Flax NNX and Optax.
  • Simple NN with Flax.
  • Freezing Parameters in Optax
  • From-scratch Implementation
  • Gradient Accumulation
  • Summary
  • Setup
  • Part 1: Microbatching for Gradient Accumulation
  • Part 2: microbatching.micro_vmap
  • Part 3: microbatching.micro_grad
  • L-BFGS
  • Linear assignment problem
  • Optimal transport
  • Lookahead Optimizer on MNIST
  • Meta-Learning
  • MLP MNIST
  • Character-level Transformer on Tiny Shakespeare
  • Hyperparameters and dataset download
  • Data preparation
  • NanoLM Model Definition
  • State, Optimizer, and Loss Definition
  • Model training
  • Text generation
  • Optimistic Gradient Descent in a Bilinear Min-Max Problem
  • Perturbed optimizers
  • Argmax one-hot
  • Differentiable ranking
  • General input / outputs (Pytrees)

previous

๐Ÿ–ผ๏ธ Example gallery

next

Adversarial training

By Optax Contributors

ยฉ Copyright 2021, DeepMind.