Skip to content

Commit 6916f4d

Browse files
author
Flax Authors
committed
Merge pull request #3059 from Neilblaze:patch-fix-v2
PiperOrigin-RevId: 527379796
2 parents b3945f8 + 2a1bef4 commit 6916f4d

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

docs/notebooks/full_eval.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@
299299
" total += len(batch['label'])\n",
300300
" correct += (batch['label'] == preds.argmax(axis=1)).sum()\n",
301301
"\n",
302-
"correc = correct.item()\n",
302+
"correct = correct.item()\n",
303303
"correct, total, correct / total"
304304
]
305305
},
@@ -351,7 +351,7 @@
351351
" total += len(batch['label'].flatten())\n",
352352
" correct += (batch['label'] == preds.argmax(axis=-1)).sum()\n",
353353
"\n",
354-
"correc = correct.item()\n",
354+
"correct = correct.item()\n",
355355
"correct, total, correct / total"
356356
]
357357
},

docs/notebooks/full_eval.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ for batch in ds.as_numpy_iterator():
140140
total += len(batch['label'])
141141
correct += (batch['label'] == preds.argmax(axis=1)).sum()
142142
143-
correc = correct.item()
143+
correct = correct.item()
144144
correct, total, correct / total
145145
```
146146

@@ -169,7 +169,7 @@ for batch in ds.as_numpy_iterator():
169169
total += len(batch['label'].flatten())
170170
correct += (batch['label'] == preds.argmax(axis=-1)).sum()
171171
172-
correc = correct.item()
172+
correct = correct.item()
173173
correct, total, correct / total
174174
```
175175

docs/notebooks/linen_intro.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
},
9393
"source": [
9494
"Let's instantiate a `Dense` layer.\n",
95-
" - Modules are actually objects in this API, so we provide _contructor arguments_ when initializing the Module. In this case, we only have to provide the output `features` dimension."
95+
" - Modules are actually objects in this API, so we provide _constructor arguments_ when initializing the Module. In this case, we only have to provide the output `features` dimension."
9696
]
9797
},
9898
{

docs/notebooks/linen_intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ from flax import linen as nn
6464
+++ {"id": "nrVbFrh1ffve"}
6565

6666
Let's instantiate a `Dense` layer.
67-
- Modules are actually objects in this API, so we provide _contructor arguments_ when initializing the Module. In this case, we only have to provide the output `features` dimension.
67+
- Modules are actually objects in this API, so we provide _constructor arguments_ when initializing the Module. In this case, we only have to provide the output `features` dimension.
6868

6969
```{code-cell}
7070
:id: EcDH20Uufc-v

examples/imagenet/imagenet.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
"#@markdown\n",
206206
"#@markdown **If you select no** below, then the files will be stored on the\n",
207207
"#@markdown *ephemeral* Colab VM. **After some time of inactivity, this VM will\n",
208-
"#@markdown be restarted an any changes are lost**.\n",
208+
"#@markdown be restarted and any changes are lost**.\n",
209209
"#@markdown\n",
210210
"#@markdown **If you select yes** below, then you will be asked for your\n",
211211
"#@markdown credentials to mount your personal Google Drive. In this case, all\n",
@@ -254,7 +254,7 @@
254254
},
255255
"outputs": [],
256256
"source": [
257-
"# Note : In Colab, above cell changed the working direcoty.\n",
257+
"# Note : In Colab, above cell changed the working directory.\n",
258258
"!pwd"
259259
]
260260
},
@@ -768,7 +768,7 @@
768768
"if 'google.colab' in str(get_ipython()):\n",
769769
" #@markdown You can upload the training results directly to https://tensorbaord.dev\n",
770770
" #@markdown\n",
771-
" #@markdown Note that everbody with the link will be able to see the data.\n",
771+
" #@markdown Note that everybody with the link will be able to see the data.\n",
772772
" upload_data = 'no' #@param ['yes', 'no']\n",
773773
" if upload_data == 'yes':\n",
774774
" !tensorboard dev upload --one_shot --logdir ./models --name 'Flax examples/mnist'"
@@ -978,7 +978,7 @@
978978
}
979979
],
980980
"source": [
981-
"# Define parallelized inference function in separate cell so the the cached\n",
981+
"# Define parallelized inference function in separate cell so the cached\n",
982982
"# compilation can be used if below cell is executed multiple times.\n",
983983
"@jax.pmap\n",
984984
"def p_get_logits(images):\n",

examples/seq2seq/seq2seq.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
"#@markdown\n",
187187
"#@markdown **If you select no** below, then the files will be stored on the\n",
188188
"#@markdown *ephemeral* Colab VM. **After some time of inactivity, this VM will\n",
189-
"#@markdown be restarted an any changes are lost**.\n",
189+
"#@markdown be restarted and any changes are lost**.\n",
190190
"#@markdown\n",
191191
"#@markdown **If you select yes** below, then you will be asked for your\n",
192192
"#@markdown credentials to mount your personal Google Drive. In this case, all\n",
@@ -647,7 +647,7 @@
647647
"if 'google.colab' in str(get_ipython()):\n",
648648
" #@markdown You can upload the training results directly to https://tensorboard.dev\n",
649649
" #@markdown\n",
650-
" #@markdown Note that everbody with the link will be able to see the data.\n",
650+
" #@markdown Note that everybody with the link will be able to see the data.\n",
651651
" upload_data = 'yes' #@param ['yes', 'no']\n",
652652
" if upload_data == 'yes':\n",
653653
" !tensorboard dev upload --one_shot --logdir ./workdirs --name 'Flax examples/seq2seq (Colab)'"

0 commit comments

Comments
 (0)