Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Add comments on how to enable Caffe GPU operations.
Browse files Browse the repository at this point in the history
  • Loading branch information
jli committed Aug 12, 2015
1 parent 08ed923 commit 4732a3d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dream.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
"\n",
"import caffe\n",
"\n",
"# If your GPU supports CUDA and Caffe was built with CUDA support,\n",
"# uncomment the following to run Caffe operations on the GPU.\n",
"# caffe.set_mode_gpu()\n",
"# caffe.set_device(0) # select GPU device if multiple devices exist\n",
"\n",
"def showarray(a, fmt='jpeg'):\n",
" a = np.uint8(np.clip(a, 0, 255))\n",
" f = StringIO()\n",
Expand Down Expand Up @@ -570,4 +575,4 @@
"metadata": {}
}
]
}
}

0 comments on commit 4732a3d

Please sign in to comment.