Skip to content

Commit d3a4db0

Browse files
committed
Automated tutorials push
1 parent 9e26ef3 commit d3a4db0

File tree

253 files changed

+35868
-15759
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+35868
-15759
lines changed

_downloads/3195443a0ced3cabc0ad643537bdb5cd/introyt1_tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{
3535
"cell_type": "code",
3636
"execution_count": null,
37-
"id": "07ca7101",
37+
"id": "15908dbe",
3838
"metadata": {},
3939
"outputs": [],
4040
"source": [
@@ -50,7 +50,7 @@
5050
},
5151
{
5252
"cell_type": "markdown",
53-
"id": "5c80c64e",
53+
"id": "70b8ab1b",
5454
"metadata": {},
5555
"source": [
5656
"\n",

_downloads/4065a985b933a4377d3c7d93557e2282/reinforcement_ppo.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@
836836
"outputs": [],
837837
"source": [
838838
"advantage_module = GAE(\n",
839-
" gamma=gamma, lmbda=lmbda, value_network=value_module, average_gae=True\n",
839+
" gamma=gamma, lmbda=lmbda, value_network=value_module, average_gae=True, device=device,\n",
840840
")\n",
841841
"\n",
842842
"loss_module = ClipPPOLoss(\n",

_downloads/4355e2cef7d17548f1e25f97a62828c4/template_tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
{
3232
"cell_type": "code",
3333
"execution_count": null,
34-
"id": "65cd1d93",
34+
"id": "a167c59c",
3535
"metadata": {},
3636
"outputs": [],
3737
"source": [
@@ -47,7 +47,7 @@
4747
},
4848
{
4949
"cell_type": "markdown",
50-
"id": "355262c2",
50+
"id": "43ebf05d",
5151
"metadata": {},
5252
"source": [
5353
"\n",

_downloads/5508d56677e1ebd9b3560596e7e41f57/semi_structured_sparse.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@
210210
SparseSemiStructuredTensor._FORCE_CUTLASS = True
211211
torch.manual_seed(100)
212212

213+
# Set default device to "cuda:0"
214+
torch.set_default_device(torch.device("cuda:0" if torch.cuda.is_available() else "cpu"))
213215

214216
######################################################################
215217
# We’ll also need to define some helper functions that are specific to the

_downloads/592c87306513ba042d759e142b59fea4/coding_ddpg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ def ceil_div(x, y):
10401040

10411041
###############################################################################
10421042
# let's use the TD(lambda) estimator!
1043-
loss_module.make_value_estimator(ValueEstimators.TDLambda, gamma=gamma, lmbda=lmbda)
1043+
loss_module.make_value_estimator(ValueEstimators.TDLambda, gamma=gamma, lmbda=lmbda, device=device)
10441044

10451045
###############################################################################
10461046
# .. note::

_downloads/63a0f0fc7b3ffb15d3a5ac8db3d521ee/tensors_deeper_tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{
3535
"cell_type": "code",
3636
"execution_count": null,
37-
"id": "c15d3934",
37+
"id": "a45d7099",
3838
"metadata": {},
3939
"outputs": [],
4040
"source": [
@@ -50,7 +50,7 @@
5050
},
5151
{
5252
"cell_type": "markdown",
53-
"id": "edc64c5d",
53+
"id": "2732eb55",
5454
"metadata": {},
5555
"source": [
5656
"\n",

_downloads/770632dd3941d2a51b831c52ded57aa2/trainingyt.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
{
3636
"cell_type": "code",
3737
"execution_count": null,
38-
"id": "416301d9",
38+
"id": "1073f678",
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [
@@ -51,7 +51,7 @@
5151
},
5252
{
5353
"cell_type": "markdown",
54-
"id": "f8d96351",
54+
"id": "27e3c66b",
5555
"metadata": {},
5656
"source": [
5757
"\n",

_downloads/7ed508ed54ec36ee5c1d3fa1e8ceede0/reinforcement_ppo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@
551551
#
552552

553553
advantage_module = GAE(
554-
gamma=gamma, lmbda=lmbda, value_network=value_module, average_gae=True
554+
gamma=gamma, lmbda=lmbda, value_network=value_module, average_gae=True, device=device,
555555
)
556556

557557
loss_module = ClipPPOLoss(

_downloads/c28f42852d456daf9af72da6c6909556/captumyt.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
{
3838
"cell_type": "code",
3939
"execution_count": null,
40-
"id": "1f4610df",
40+
"id": "2a24e8c1",
4141
"metadata": {},
4242
"outputs": [],
4343
"source": [
@@ -53,7 +53,7 @@
5353
},
5454
{
5555
"cell_type": "markdown",
56-
"id": "73c65f06",
56+
"id": "1b79833c",
5757
"metadata": {},
5858
"source": [
5959
"\n",

_downloads/e2e556f6b4693c2cef716dd7f40caaf6/tensorboardyt_tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
{
3636
"cell_type": "code",
3737
"execution_count": null,
38-
"id": "bd2b8139",
38+
"id": "99cb8ba2",
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [
@@ -51,7 +51,7 @@
5151
},
5252
{
5353
"cell_type": "markdown",
54-
"id": "4fc6d23a",
54+
"id": "f54e4f7b",
5555
"metadata": {},
5656
"source": [
5757
"\n",

_downloads/e6af5f45662e344f06f9caca32c8752f/semi_structured_sparse.ipynb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,10 @@
250250
"\n",
251251
"# force CUTLASS use if ``cuSPARSELt`` is not available\n",
252252
"SparseSemiStructuredTensor._FORCE_CUTLASS = True\n",
253-
"torch.manual_seed(100)"
253+
"torch.manual_seed(100)\n",
254+
"\n",
255+
"# Set default device to \"cuda:0\"\n",
256+
"torch.set_default_device(torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\"))"
254257
]
255258
},
256259
{

_downloads/e9ea08c1c8bbc809d69c69a6043d56ee/coding_ddpg.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@
14791479
},
14801480
"outputs": [],
14811481
"source": [
1482-
"loss_module.make_value_estimator(ValueEstimators.TDLambda, gamma=gamma, lmbda=lmbda)"
1482+
"loss_module.make_value_estimator(ValueEstimators.TDLambda, gamma=gamma, lmbda=lmbda, device=device)"
14831483
]
14841484
},
14851485
{

_downloads/ed9d4f94afb79f7dada6742a06c486a5/autogradyt_tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{
3535
"cell_type": "code",
3636
"execution_count": null,
37-
"id": "4fdbbc06",
37+
"id": "ec2b0c14",
3838
"metadata": {},
3939
"outputs": [],
4040
"source": [
@@ -50,7 +50,7 @@
5050
},
5151
{
5252
"cell_type": "markdown",
53-
"id": "59a4103a",
53+
"id": "160ae8e6",
5454
"metadata": {},
5555
"source": [
5656
"\n",

_downloads/fe726e041160526cf828806536922cf6/modelsyt_tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{
3535
"cell_type": "code",
3636
"execution_count": null,
37-
"id": "f252b13b",
37+
"id": "612b5862",
3838
"metadata": {},
3939
"outputs": [],
4040
"source": [
@@ -50,7 +50,7 @@
5050
},
5151
{
5252
"cell_type": "markdown",
53-
"id": "9f07beb5",
53+
"id": "8b01b0b8",
5454
"metadata": {},
5555
"source": [
5656
"\n",
0 Bytes
0 Bytes
0 Bytes
0 Bytes

_images/sphx_glr_coding_ddpg_001.png

1.12 KB
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
7.57 KB
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
36 Bytes

_images/sphx_glr_nn_tutorial_001.png

0 Bytes
0 Bytes

_images/sphx_glr_pendulum_001.png

0 Bytes
283 Bytes
-36 Bytes
1.85 KB
1.36 KB
0 Bytes
0 Bytes
0 Bytes
0 Bytes
0 Bytes
11.8 KB
0 Bytes
0 Bytes
-1.11 KB

_images/sphx_glr_trainingyt_001.png

0 Bytes

_sources/advanced/coding_ddpg.rst.txt

Lines changed: 22 additions & 22 deletions

_sources/advanced/dynamic_quantization_tutorial.rst.txt

Lines changed: 3 additions & 3 deletions

_sources/advanced/neural_style_tutorial.rst.txt

Lines changed: 33 additions & 34 deletions

_sources/advanced/numpy_extensions_tutorial.rst.txt

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)