Skip to content

Commit 72ecb2f

Browse files
authored
Fix Markdown Rendering for Handwriting Recognition Example (#2181)
* added-missing-backticks * updated-py-and-ipynb-files
1 parent 5581fd9 commit 72ecb2f

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

examples/vision/handwriting_recognition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Title: Handwriting recognition
33
Authors: [A_K_Nain](https://twitter.com/A_K_Nain), [Sayak Paul](https://twitter.com/RisingSayak)
44
Date created: 2021/08/16
5-
Last modified: 2024/09/01
5+
Last modified: 2025/09/29
66
Description: Training a handwriting recognition model with variable-length sequences.
77
Accelerator: GPU
88
"""

examples/vision/ipynb/handwriting_recognition.ipynb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"\n",
1111
"**Authors:** [A_K_Nain](https://twitter.com/A_K_Nain), [Sayak Paul](https://twitter.com/RisingSayak)<br>\n",
1212
"**Date created:** 2021/08/16<br>\n",
13-
"**Last modified:** 2024/09/01<br>\n",
13+
"**Last modified:** 2025/09/29<br>\n",
1414
"**Description:** Training a handwriting recognition model with variable-length sequences."
1515
]
1616
},
@@ -389,8 +389,7 @@
389389
"\n",
390390
" image = ops.transpose(image, (1, 0, 2))\n",
391391
" image = tf.image.flip_left_right(image)\n",
392-
" return image\n",
393-
""
392+
" return image\n"
394393
]
395394
},
396395
{
@@ -455,8 +454,7 @@
455454
" dataset = tf.data.Dataset.from_tensor_slices((image_paths, labels)).map(\n",
456455
" process_images_labels, num_parallel_calls=AUTOTUNE\n",
457456
" )\n",
458-
" return dataset.batch(batch_size).cache().prefetch(AUTOTUNE)\n",
459-
""
457+
" return dataset.batch(batch_size).cache().prefetch(AUTOTUNE)\n"
460458
]
461459
},
462460
{
@@ -735,8 +733,7 @@
735733
"\n",
736734
" print(\n",
737735
" f\"Mean edit distance for epoch {epoch + 1}: {np.mean(edit_distances):.4f}\"\n",
738-
" )\n",
739-
""
736+
" )\n"
740737
]
741738
},
742739
{
@@ -772,8 +769,7 @@
772769
" validation_data=validation_ds,\n",
773770
" epochs=epochs,\n",
774771
" callbacks=[edit_distance_callback],\n",
775-
")\n",
776-
""
772+
")\n"
777773
]
778774
},
779775
{
@@ -895,4 +891,4 @@
895891
},
896892
"nbformat": 4,
897893
"nbformat_minor": 0
898-
}
894+
}

examples/vision/md/handwriting_recognition.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Authors:** [A_K_Nain](https://twitter.com/A_K_Nain), [Sayak Paul](https://twitter.com/RisingSayak)<br>
44
**Date created:** 2021/08/16<br>
5-
**Last modified:** 2024/09/01<br>
5+
**Last modified:** 2025/09/29<br>
66
**Description:** Training a handwriting recognition model with variable-length sequences.
77

88

@@ -687,6 +687,7 @@ Epoch 9/10
687687
688688
Epoch 10/10
689689
1357/1357 ━━━━━━━━━━━━━━━━━━━━ 208s 153ms/step - loss: 245.5216 - val_loss: 195.7952
690+
```
690691
</div>
691692

692693
---

0 commit comments

Comments
 (0)