{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# For tips on running notebooks in Google Colab, see\n", "# https://pytorch.org/tutorials/beginner/colab\n", "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Per-sample-gradients\n", "====================\n", "\n", "What is it?\n", "-----------\n", "\n", "Per-sample-gradient computation is computing the gradient for each and\n", "every sample in a batch of data. It is a useful quantity in differential\n", "privacy, meta-learning, and optimization research.\n", "\n", "
This tutorial requires PyTorch 2.0.0 or later.
\n", "