From 2b63fd952bdc9c7c72edd501cbcdbf3231e98f00 Mon Sep 17 00:00:00 2001 From: aktersnurra Date: Wed, 9 Sep 2020 23:31:31 +0200 Subject: Created an abstract Dataset class for common methods. --- src/notebooks/03a-line-prediction.ipynb | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'src/notebooks/03a-line-prediction.ipynb') diff --git a/src/notebooks/03a-line-prediction.ipynb b/src/notebooks/03a-line-prediction.ipynb index 65c6dd6..336614f 100644 --- a/src/notebooks/03a-line-prediction.ipynb +++ b/src/notebooks/03a-line-prediction.ipynb @@ -49,7 +49,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "2020-09-01 23:37:29.664 | DEBUG | text_recognizer.datasets.emnist_lines_dataset:_load_data:164 - EmnistLinesDataset loading data from HDF5...\n" + "2020-09-09 20:38:27.854 | DEBUG | text_recognizer.datasets.emnist_lines_dataset:_load_data:164 - EmnistLinesDataset loading data from HDF5...\n" ] } ], @@ -67,6 +67,35 @@ " return ''.join([emnist_lines.mapper(int(i)) for i in y])" ] }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "data, target = emnist_lines[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "torch.Size([34])" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "target.shape" + ] + }, { "cell_type": "code", "execution_count": 6, -- cgit v1.2.3-70-g09d2