Small fix to tutorial

Summary: Small fix to `fit_textured_mesh.ipynb` tutorial due to a recent change in numpy

Reviewed By: bottler

Differential Revision: D29219990

fbshipit-source-id: f5feeef9eb952720ea7154d066795fbbe64ce7a1
This commit is contained in:
Nikhila Ravi
2021-06-18 07:39:59 -07:00
committed by Facebook GitHub Bot
parent 029a9da00b
commit a343cf534c
2 changed files with 9 additions and 8 deletions

View File

@@ -46,8 +46,8 @@
"id": "okLalbR_g7NS"
},
"source": [
"Ensure `torch` and `torchvision` are installed. If `pytorch3d` is not installed, install it using the following cell:"
]
"Ensure `torch` and `torchvision` are installed. If `pytorch3d` is not installed, install it using the following cell:"
]
},
{
"cell_type": "code",
@@ -645,7 +645,8 @@
" sum_loss = torch.tensor(0.0, device=device)\n",
" for k, l in loss.items():\n",
" sum_loss += l * losses[k][\"weight\"]\n",
" losses[k][\"values\"].append(l)\n",
" losses[k][\"values\"].append(float(l.detach().cpu()))\n",
"\n",
" \n",
" # Print the losses\n",
" loop.set_description(\"total_loss = %.6f\" % sum_loss)\n",
@@ -829,7 +830,7 @@
" sum_loss = torch.tensor(0.0, device=device)\n",
" for k, l in loss.items():\n",
" sum_loss += l * losses[k][\"weight\"]\n",
" losses[k][\"values\"].append(l)\n",
" losses[k][\"values\"].append(float(l.detach().cpu()))\n",
" \n",
" # Print the losses\n",
" loop.set_description(\"total_loss = %.6f\" % sum_loss)\n",