From dc6d3a6316e83ca01d91c533db94676fdaf22368 Mon Sep 17 00:00:00 2001 From: Vignesh Singaravelu <143326541+usefulldivider@users.noreply.github.com> Date: Thu, 13 Jun 2024 18:19:11 +0530 Subject: [PATCH] adding a note about torch.mean dtype can be used to specify the type rather than using typecasting --- 00_pytorch_fundamentals.ipynb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/00_pytorch_fundamentals.ipynb b/00_pytorch_fundamentals.ipynb index 17c5d9ef..b14b93b5 100644 --- a/00_pytorch_fundamentals.ipynb +++ b/00_pytorch_fundamentals.ipynb @@ -2099,6 +2099,8 @@ "source": [ "> **Note:** You may find some methods such as `torch.mean()` require tensors to be in `torch.float32` (the most common) or another specific datatype, otherwise the operation will fail. \n", "\n", + ".mean has an optional parameter called dtype which tells the desired data type of returned tensor and also casts the input tensor to the specified dtype." + "\n" "You can also do the same as above with `torch` methods." ] },