From f78ad6e6adee4c90ad1b29d6058ece186bb423a4 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 25 Oct 2021 22:29:55 +0200 Subject: Update notebooks --- notebooks/03-look-at-iam-paragraphs.ipynb | 119 +----------------------------- 1 file changed, 1 insertion(+), 118 deletions(-) (limited to 'notebooks/03-look-at-iam-paragraphs.ipynb') diff --git a/notebooks/03-look-at-iam-paragraphs.ipynb b/notebooks/03-look-at-iam-paragraphs.ipynb index f57d491..b55aa12 100644 --- a/notebooks/03-look-at-iam-paragraphs.ipynb +++ b/notebooks/03-look-at-iam-paragraphs.ipynb @@ -275,8 +275,7 @@ "source": [ "# context initialization\n", "with initialize(config_path=\"../training/conf/\"):\n", - " cfg = compose(config_name=\"config\", overrides=[\"+experiment=cnn_transformer_paragraphs\"])\n", - " print(OmegaConf.to_yaml(cfg))" + " cfg = compose(config_name=\"config\", overrides=[\"+experiment=cnn_transformer_paragraphs\"])" ] }, { @@ -471,122 +470,6 @@ " x, y = dataset[i]\n", " _plot(x[0], vmax=1, title=convert_y_label_to_string(y, datamodule.mapping))" ] - }, - { - "cell_type": "code", - "execution_count": 23, - "id": "6f53950a-6858-40b6-ad4a-2857227d9d59", - "metadata": {}, - "outputs": [], - "source": [ - "a = torch.randn(2, 1, 576, 640), torch.randn(2, 1, 576, 640)" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "580b9bbc-b213-4ef8-aefb-cfb453d08a44", - "metadata": {}, - "outputs": [], - "source": [ - "from text_recognizer.data.transforms.load_transform import load_transforms" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "15744542-0880-45f2-881b-d81e04668305", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Compose(\n", - " \n", - " ColorJitter(brightness=[0.8, 1.6], contrast=None, saturation=None, hue=None)\n", - " RandomAffine(degrees=[-1.0, 1.0], shear=[-30.0, 20.0], interpolation=bilinear)\n", - " ToTensor()\n", - ")" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "load_transforms(\"iam_lines.yaml\")" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "id": "5d7eab42-c407-4b88-9492-e9279a38232a", - "metadata": {}, - "outputs": [], - "source": [ - "from torchvision.transforms import ColorJitter" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "3d02a3fe-1128-416f-80e1-84c9287e613d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "ColorJitter(brightness=[0.5, 1.0], contrast=None, saturation=None, hue=None)" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ColorJitter(brightness=[0.5, 1.0])" - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "id": "f0ead6d1-3093-4a42-a3b2-b3cdea75fc21", - "metadata": {}, - "outputs": [], - "source": [ - "import torchvision" - ] - }, - { - "cell_type": "code", - "execution_count": 46, - "id": "f4c1606d-a063-465d-bf22-61a1cbc14ab9", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 46, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "getattr(torchvision.transforms.functional.InterpolationMode, \"BILINEAR\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "617568a7-fde1-4f60-80c5-922d764f0c52", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { -- cgit v1.2.3-70-g09d2