diff --git a/README.md b/README.md index 6b6b62be33..6bc4f3ac2f 100644 --- a/README.md +++ b/README.md @@ -364,6 +364,7 @@ Fabric is designed for the most complex models like foundation model scaling, LL - loss.backward() + fabric.backward(loss) optimizer.step() + print(loss.data) ``` @@ -397,6 +398,7 @@ for epoch in range(num_epochs): loss = torch.nn.functional.cross_entropy(outputs, labels) fabric.backward(loss) optimizer.step() + print(loss.data) ```