mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-24 16:20:34 +08:00
CPU device for tutorials
Reviewed By: nikhilaravi Differential Revision: D22357376 fbshipit-source-id: c103f9b0c798d4425d642781b5bfbb1a27310270
This commit is contained in:
committed by
Facebook GitHub Bot
parent
52979226bc
commit
275ddade66
@@ -217,8 +217,11 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Setup\n",
|
||||
"device = torch.device(\"cuda:0\")\n",
|
||||
"torch.cuda.set_device(device)\n",
|
||||
"if torch.cuda.is_available():\n",
|
||||
" device = torch.device(\"cuda:0\")\n",
|
||||
" torch.cuda.set_device(device)\n",
|
||||
"else:\n",
|
||||
" device = torch.device(\"cpu\")\n",
|
||||
"\n",
|
||||
"# Set paths\n",
|
||||
"DATA_DIR = \"./data\"\n",
|
||||
|
||||
Reference in New Issue
Block a user