add desc for minimize (#3216)

This commit is contained in:
Ananya Harsh Jha 2020-08-27 14:25:39 -04:00 committed by GitHub
parent f03943ee94
commit 40eaa2143e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -80,6 +80,10 @@ The `TrainResult` basic usage is this:
minimize minimize
^^^^^^^^ ^^^^^^^^
When using TrainResult, the metric that needs to be minimized is passed to this
argument. Internally, the tensor is verified to contain gradients and `.backward()`
is called on it.
.. code-block:: python .. code-block:: python
def training_step(...): def training_step(...):