PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# the dataset used is kaggle IAM Dataset which contains 115k images of handwritten words
!pip install torch==1.13.1 onnx==1.12.0 torchsummaryX
!pip install torchviz
!pip install mltu
import matplotlib.pyplot as plt
from torchviz import make_dot
import os
import tarfile
from tqdm import tqdm
from io import BytesIO
from zipfile import ZipFile
from urllib.request import urlopen
# import google drive
from google.colab import drive
drive.mount('/content/drive')
import torch
import torch.optim as optim
from torchsummaryX import summary
from mltu.torch.model import Model
from mltu.torch.losses import CTCLoss
from mltu.torch.dataProvider import DataProvider
from mltu.torch.metrics import CERMetric, WERMetric
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run