From dbf742d3f64edde7b8318d7ff1ddc82ab417aa6e Mon Sep 17 00:00:00 2001 From: seanzhangkx8 <106214464+seanzhangkx8@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:08:22 -0400 Subject: [PATCH] Add CPU Option in Demo --- .../forecaster/CRAFT Forecaster demo.ipynb | 979 +----------------- 1 file changed, 41 insertions(+), 938 deletions(-) diff --git a/examples/forecaster/CRAFT Forecaster demo.ipynb b/examples/forecaster/CRAFT Forecaster demo.ipynb index eb7a3f42..d54d5b3d 100644 --- a/examples/forecaster/CRAFT Forecaster demo.ipynb +++ b/examples/forecaster/CRAFT Forecaster demo.ipynb @@ -33,7 +33,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "Dataset already exists at /home/jonathan/.convokit/downloads/conversations-gone-awry-cmv-corpus\n" + "Downloading conversations-gone-awry-cmv-corpus to /Users/seanzhangkx/.convokit/downloads/conversations-gone-awry-cmv-corpus\n", + "Downloading conversations-gone-awry-cmv-corpus from http://zissou.infosci.cornell.edu/convokit/datasets/conversations-gone-awry-cmv-corpus/conversations-gone-awry-cmv-corpus.zip (51.5MB)... Done\n" ] } ], @@ -99,6 +100,19 @@ { "cell_type": "code", "execution_count": 4, + "id": "9ee62d7f", + "metadata": {}, + "outputs": [], + "source": [ + "# We define the constant DEVICE to specify whether we want to run in GPU mode or CPU mode. As CRAFT is a neural model, GPU mode\n", + "# (activated with the value \"cuda\") is preferred. But if your machine lacks a GPU, you can change the value to \"cpu\" to enable\n", + "# CPU mode (noting that it will be slower)\n", + "DEVICE = \"cpu\"" + ] + }, + { + "cell_type": "code", + "execution_count": 5, "id": "653febf7-ef59-4e8b-8ce2-39b4a33c3747", "metadata": {}, "outputs": [ @@ -106,7 +120,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Downloading craft-cmv-pretrained to /home/jonathan/.convokit/saved-models/craft-cmv-pretrained\n", + "Downloading craft-cmv-pretrained to /Users/seanzhangkx/.convokit/saved-models/craft-cmv-pretrained\n", "Downloading craft-cmv-pretrained/craft_pretrained.tar from https://zissou.infosci.cornell.edu/convokit/models/craft_cmv/craft_pretrained.tar (974.6MB)... Done\n", "Downloading craft-cmv-pretrained/index2word.json from https://zissou.infosci.cornell.edu/convokit/models/craft_cmv/index2word.json (1.0MB)... Done\n", "Downloading craft-cmv-pretrained/word2index.json from https://zissou.infosci.cornell.edu/convokit/models/craft_cmv/word2index.json (928.0KB)... Done\n" @@ -114,12 +128,12 @@ } ], "source": [ - "craft = CRAFTModel(\"craft-cmv-pretrained\", torch_device=\"cuda\")" + "craft = CRAFTModel(\"craft-cmv-pretrained\", torch_device=DEVICE)" ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "id": "c971ec31-964b-4df0-a7bb-d064ae62c5a3", "metadata": {}, "outputs": [], @@ -139,7 +153,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "id": "8590e7b3-f633-4844-baea-18bee961eebd", "metadata": { "scrolled": true @@ -159,939 +173,28 @@ "Will train for 1920 iterations\n", "Initializing ...\n", "Training...\n", - "Iteration: 10; Percent complete: 0.5%; Average loss: 0.6961\n", - "Iteration: 20; Percent complete: 1.0%; Average loss: 0.6940\n", - "Iteration: 30; Percent complete: 1.6%; Average loss: 0.6913\n", - "Iteration: 40; Percent complete: 2.1%; Average loss: 0.6933\n", - "Iteration: 50; Percent complete: 2.6%; Average loss: 0.6919\n", - "Iteration: 60; Percent complete: 3.1%; Average loss: 0.6927\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 50.00%\n", - "Validation accuracy better than current best; saving model...\n", - "Iteration: 70; Percent complete: 3.6%; Average loss: 0.6939\n", - "Iteration: 80; Percent complete: 4.2%; Average loss: 0.6924\n", - "Iteration: 90; Percent complete: 4.7%; Average loss: 0.6935\n", - "Iteration: 100; Percent complete: 5.2%; Average loss: 0.6914\n", - "Iteration: 110; Percent complete: 5.7%; Average loss: 0.6922\n", - "Iteration: 120; Percent complete: 6.2%; Average loss: 0.6919\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 50.73%\n", - "Validation accuracy better than current best; saving model...\n", - "Iteration: 130; Percent complete: 6.8%; Average loss: 0.6932\n", - "Iteration: 140; Percent complete: 7.3%; Average loss: 0.6919\n", - "Iteration: 150; Percent complete: 7.8%; Average loss: 0.6898\n", - "Iteration: 160; Percent complete: 8.3%; Average loss: 0.6913\n", - "Iteration: 170; Percent complete: 8.9%; Average loss: 0.6900\n", - "Iteration: 180; Percent complete: 9.4%; Average loss: 0.6907\n", - "Iteration: 190; Percent complete: 9.9%; Average loss: 0.6900\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 58.04%\n", - "Validation accuracy better than current best; saving model...\n", - "Iteration: 200; Percent complete: 10.4%; Average loss: 0.6896\n", - "Iteration: 210; Percent complete: 10.9%; Average loss: 0.6895\n", - "Iteration: 220; Percent complete: 11.5%; Average loss: 0.6882\n", - "Iteration: 230; Percent complete: 12.0%; Average loss: 0.6885\n", - "Iteration: 240; Percent complete: 12.5%; Average loss: 0.6884\n", - "Iteration: 250; Percent complete: 13.0%; Average loss: 0.6891\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 59.87%\n", - "Validation accuracy better than current best; saving model...\n", - "Iteration: 260; Percent complete: 13.5%; Average loss: 0.6878\n", - "Iteration: 270; Percent complete: 14.1%; Average loss: 0.6862\n", - "Iteration: 280; Percent complete: 14.6%; Average loss: 0.6864\n", - "Iteration: 290; Percent complete: 15.1%; Average loss: 0.6857\n", - "Iteration: 300; Percent complete: 15.6%; Average loss: 0.6835\n", - "Iteration: 310; Percent complete: 16.1%; Average loss: 0.6844\n", - "Iteration: 320; Percent complete: 16.7%; Average loss: 0.6810\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 58.26%\n", - "Iteration: 330; Percent complete: 17.2%; Average loss: 0.6831\n", - "Iteration: 340; Percent complete: 17.7%; Average loss: 0.6777\n", - "Iteration: 350; Percent complete: 18.2%; Average loss: 0.6753\n", - "Iteration: 360; Percent complete: 18.8%; Average loss: 0.6764\n", - "Iteration: 370; Percent complete: 19.3%; Average loss: 0.6775\n", - "Iteration: 380; Percent complete: 19.8%; Average loss: 0.6769\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 58.99%\n", - "Iteration: 390; Percent complete: 20.3%; Average loss: 0.6728\n", - "Iteration: 400; Percent complete: 20.8%; Average loss: 0.6699\n", - "Iteration: 410; Percent complete: 21.4%; Average loss: 0.6635\n", - "Iteration: 420; Percent complete: 21.9%; Average loss: 0.6609\n", - "Iteration: 430; Percent complete: 22.4%; Average loss: 0.6677\n", - "Iteration: 440; Percent complete: 22.9%; Average loss: 0.6520\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 61.40%\n", - "Validation accuracy better than current best; saving model...\n", - "Iteration: 450; Percent complete: 23.4%; Average loss: 0.6500\n", - "Iteration: 460; Percent complete: 24.0%; Average loss: 0.6436\n", - "Iteration: 470; Percent complete: 24.5%; Average loss: 0.6371\n", - "Iteration: 480; Percent complete: 25.0%; Average loss: 0.6306\n", - "Iteration: 490; Percent complete: 25.5%; Average loss: 0.6294\n", - "Iteration: 500; Percent complete: 26.0%; Average loss: 0.6208\n", - "Iteration: 510; Percent complete: 26.6%; Average loss: 0.6200\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 62.72%\n", - "Validation accuracy better than current best; saving model...\n", - "Iteration: 520; Percent complete: 27.1%; Average loss: 0.6012\n", - "Iteration: 530; Percent complete: 27.6%; Average loss: 0.5968\n", - "Iteration: 540; Percent complete: 28.1%; Average loss: 0.5813\n", - "Iteration: 550; Percent complete: 28.6%; Average loss: 0.5728\n", - "Iteration: 560; Percent complete: 29.2%; Average loss: 0.5654\n", - "Iteration: 570; Percent complete: 29.7%; Average loss: 0.5799\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.11%\n", - "Validation accuracy better than current best; saving model...\n", - "Iteration: 580; Percent complete: 30.2%; Average loss: 0.5732\n", - "Iteration: 590; Percent complete: 30.7%; Average loss: 0.5349\n", - "Iteration: 600; Percent complete: 31.2%; Average loss: 0.5408\n", - "Iteration: 610; Percent complete: 31.8%; Average loss: 0.5369\n", - "Iteration: 620; Percent complete: 32.3%; Average loss: 0.5261\n", - "Iteration: 630; Percent complete: 32.8%; Average loss: 0.5020\n", - "Iteration: 640; Percent complete: 33.3%; Average loss: 0.5391\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 63.60%\n", - "Iteration: 650; Percent complete: 33.9%; Average loss: 0.5015\n", - "Iteration: 660; Percent complete: 34.4%; Average loss: 0.4643\n", - "Iteration: 670; Percent complete: 34.9%; Average loss: 0.4849\n", - "Iteration: 680; Percent complete: 35.4%; Average loss: 0.4836\n", - "Iteration: 690; Percent complete: 35.9%; Average loss: 0.4949\n", - "Iteration: 700; Percent complete: 36.5%; Average loss: 0.5020\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 65.06%\n", - "Validation accuracy better than current best; saving model...\n", - "Iteration: 710; Percent complete: 37.0%; Average loss: 0.4738\n", - "Iteration: 720; Percent complete: 37.5%; Average loss: 0.4894\n", - "Iteration: 730; Percent complete: 38.0%; Average loss: 0.4619\n", - "Iteration: 740; Percent complete: 38.5%; Average loss: 0.4266\n", - "Iteration: 750; Percent complete: 39.1%; Average loss: 0.4382\n", - "Iteration: 760; Percent complete: 39.6%; Average loss: 0.4347\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 65.28%\n", - "Validation accuracy better than current best; saving model...\n", - "Iteration: 770; Percent complete: 40.1%; Average loss: 0.4164\n", - "Iteration: 780; Percent complete: 40.6%; Average loss: 0.4355\n", - "Iteration: 790; Percent complete: 41.1%; Average loss: 0.4091\n", - "Iteration: 800; Percent complete: 41.7%; Average loss: 0.4021\n", - "Iteration: 810; Percent complete: 42.2%; Average loss: 0.4062\n", - "Iteration: 820; Percent complete: 42.7%; Average loss: 0.4020\n", - "Iteration: 830; Percent complete: 43.2%; Average loss: 0.3823\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 66.15%\n", - "Validation accuracy better than current best; saving model...\n", - "Iteration: 840; Percent complete: 43.8%; Average loss: 0.3764\n", - "Iteration: 850; Percent complete: 44.3%; Average loss: 0.3609\n", - "Iteration: 860; Percent complete: 44.8%; Average loss: 0.3887\n", - "Iteration: 870; Percent complete: 45.3%; Average loss: 0.3383\n", - "Iteration: 880; Percent complete: 45.8%; Average loss: 0.3444\n", - "Iteration: 890; Percent complete: 46.4%; Average loss: 0.3555\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 66.08%\n", - "Iteration: 900; Percent complete: 46.9%; Average loss: 0.3438\n", - "Iteration: 910; Percent complete: 47.4%; Average loss: 0.3542\n", - "Iteration: 920; Percent complete: 47.9%; Average loss: 0.3245\n", - "Iteration: 930; Percent complete: 48.4%; Average loss: 0.3020\n", - "Iteration: 940; Percent complete: 49.0%; Average loss: 0.3118\n", - "Iteration: 950; Percent complete: 49.5%; Average loss: 0.2880\n", - "Iteration: 960; Percent complete: 50.0%; Average loss: 0.2943\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 65.57%\n", - "Iteration: 970; Percent complete: 50.5%; Average loss: 0.3093\n", - "Iteration: 980; Percent complete: 51.0%; Average loss: 0.2756\n", - "Iteration: 990; Percent complete: 51.6%; Average loss: 0.2614\n", - "Iteration: 1000; Percent complete: 52.1%; Average loss: 0.2713\n", - "Iteration: 1010; Percent complete: 52.6%; Average loss: 0.2505\n", - "Iteration: 1020; Percent complete: 53.1%; Average loss: 0.2934\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.84%\n", - "Iteration: 1030; Percent complete: 53.6%; Average loss: 0.2460\n", - "Iteration: 1040; Percent complete: 54.2%; Average loss: 0.2291\n", - "Iteration: 1050; Percent complete: 54.7%; Average loss: 0.2448\n", - "Iteration: 1060; Percent complete: 55.2%; Average loss: 0.1950\n", - "Iteration: 1070; Percent complete: 55.7%; Average loss: 0.2089\n", - "Iteration: 1080; Percent complete: 56.2%; Average loss: 0.2118\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.99%\n", - "Iteration: 1090; Percent complete: 56.8%; Average loss: 0.2151\n", - "Iteration: 1100; Percent complete: 57.3%; Average loss: 0.2259\n", - "Iteration: 1110; Percent complete: 57.8%; Average loss: 0.2176\n", - "Iteration: 1120; Percent complete: 58.3%; Average loss: 0.1892\n", - "Iteration: 1130; Percent complete: 58.9%; Average loss: 0.1718\n", - "Iteration: 1140; Percent complete: 59.4%; Average loss: 0.1768\n", - "Iteration: 1150; Percent complete: 59.9%; Average loss: 0.1648\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.55%\n", - "Iteration: 1160; Percent complete: 60.4%; Average loss: 0.1624\n", - "Iteration: 1170; Percent complete: 60.9%; Average loss: 0.1879\n", - "Iteration: 1180; Percent complete: 61.5%; Average loss: 0.1579\n", - "Iteration: 1190; Percent complete: 62.0%; Average loss: 0.1612\n", - "Iteration: 1200; Percent complete: 62.5%; Average loss: 0.1378\n", - "Iteration: 1210; Percent complete: 63.0%; Average loss: 0.1538\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.91%\n", - "Iteration: 1220; Percent complete: 63.5%; Average loss: 0.1335\n", - "Iteration: 1230; Percent complete: 64.1%; Average loss: 0.1105\n", - "Iteration: 1240; Percent complete: 64.6%; Average loss: 0.1189\n", - "Iteration: 1250; Percent complete: 65.1%; Average loss: 0.1154\n", - "Iteration: 1260; Percent complete: 65.6%; Average loss: 0.1082\n", - "Iteration: 1270; Percent complete: 66.1%; Average loss: 0.1088\n", - "Iteration: 1280; Percent complete: 66.7%; Average loss: 0.1487\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.18%\n", - "Iteration: 1290; Percent complete: 67.2%; Average loss: 0.1057\n", - "Iteration: 1300; Percent complete: 67.7%; Average loss: 0.0807\n", - "Iteration: 1310; Percent complete: 68.2%; Average loss: 0.0938\n", - "Iteration: 1320; Percent complete: 68.8%; Average loss: 0.0922\n", - "Iteration: 1330; Percent complete: 69.3%; Average loss: 0.0923\n", - "Iteration: 1340; Percent complete: 69.8%; Average loss: 0.0844\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.40%\n", - "Iteration: 1350; Percent complete: 70.3%; Average loss: 0.1010\n", - "Iteration: 1360; Percent complete: 70.8%; Average loss: 0.0975\n", - "Iteration: 1370; Percent complete: 71.4%; Average loss: 0.0591\n", - "Iteration: 1380; Percent complete: 71.9%; Average loss: 0.0787\n", - "Iteration: 1390; Percent complete: 72.4%; Average loss: 0.0675\n", - "Iteration: 1400; Percent complete: 72.9%; Average loss: 0.0881\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.40%\n", - "Iteration: 1410; Percent complete: 73.4%; Average loss: 0.0647\n", - "Iteration: 1420; Percent complete: 74.0%; Average loss: 0.0607\n", - "Iteration: 1430; Percent complete: 74.5%; Average loss: 0.0794\n", - "Iteration: 1440; Percent complete: 75.0%; Average loss: 0.0590\n", - "Iteration: 1450; Percent complete: 75.5%; Average loss: 0.0830\n", - "Iteration: 1460; Percent complete: 76.0%; Average loss: 0.0502\n", - "Iteration: 1470; Percent complete: 76.6%; Average loss: 0.0429\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.40%\n", - "Iteration: 1480; Percent complete: 77.1%; Average loss: 0.0576\n", - "Iteration: 1490; Percent complete: 77.6%; Average loss: 0.0481\n", - "Iteration: 1500; Percent complete: 78.1%; Average loss: 0.0493\n", - "Iteration: 1510; Percent complete: 78.6%; Average loss: 0.0487\n", - "Iteration: 1520; Percent complete: 79.2%; Average loss: 0.0412\n", - "Iteration: 1530; Percent complete: 79.7%; Average loss: 0.0473\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.47%\n", - "Iteration: 1540; Percent complete: 80.2%; Average loss: 0.0422\n", - "Iteration: 1550; Percent complete: 80.7%; Average loss: 0.0372\n", - "Iteration: 1560; Percent complete: 81.2%; Average loss: 0.0387\n", - "Iteration: 1570; Percent complete: 81.8%; Average loss: 0.0493\n", - "Iteration: 1580; Percent complete: 82.3%; Average loss: 0.0197\n", - "Iteration: 1590; Percent complete: 82.8%; Average loss: 0.0446\n", - "Iteration: 1600; Percent complete: 83.3%; Average loss: 0.0252\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.69%\n", - "Iteration: 1610; Percent complete: 83.9%; Average loss: 0.0315\n", - "Iteration: 1620; Percent complete: 84.4%; Average loss: 0.0422\n", - "Iteration: 1630; Percent complete: 84.9%; Average loss: 0.0272\n", - "Iteration: 1640; Percent complete: 85.4%; Average loss: 0.0243\n", - "Iteration: 1650; Percent complete: 85.9%; Average loss: 0.0300\n", - "Iteration: 1660; Percent complete: 86.5%; Average loss: 0.0413\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.40%\n", - "Iteration: 1670; Percent complete: 87.0%; Average loss: 0.0139\n", - "Iteration: 1680; Percent complete: 87.5%; Average loss: 0.0254\n", - "Iteration: 1690; Percent complete: 88.0%; Average loss: 0.0362\n", - "Iteration: 1700; Percent complete: 88.5%; Average loss: 0.0173\n", - "Iteration: 1710; Percent complete: 89.1%; Average loss: 0.0310\n", - "Iteration: 1720; Percent complete: 89.6%; Average loss: 0.0179\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.55%\n", - "Iteration: 1730; Percent complete: 90.1%; Average loss: 0.0137\n", - "Iteration: 1740; Percent complete: 90.6%; Average loss: 0.0208\n", - "Iteration: 1750; Percent complete: 91.1%; Average loss: 0.0261\n", - "Iteration: 1760; Percent complete: 91.7%; Average loss: 0.0143\n", - "Iteration: 1770; Percent complete: 92.2%; Average loss: 0.0142\n", - "Iteration: 1780; Percent complete: 92.7%; Average loss: 0.0256\n", - "Iteration: 1790; Percent complete: 93.2%; Average loss: 0.0149\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.40%\n", - "Iteration: 1800; Percent complete: 93.8%; Average loss: 0.0137\n", - "Iteration: 1810; Percent complete: 94.3%; Average loss: 0.0171\n", - "Iteration: 1820; Percent complete: 94.8%; Average loss: 0.0191\n", - "Iteration: 1830; Percent complete: 95.3%; Average loss: 0.0089\n", - "Iteration: 1840; Percent complete: 95.8%; Average loss: 0.0167\n", - "Iteration: 1850; Percent complete: 96.4%; Average loss: 0.0139\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.77%\n", - "Iteration: 1860; Percent complete: 96.9%; Average loss: 0.0156\n", - "Iteration: 1870; Percent complete: 97.4%; Average loss: 0.0130\n", - "Iteration: 1880; Percent complete: 97.9%; Average loss: 0.0097\n", - "Iteration: 1890; Percent complete: 98.4%; Average loss: 0.0132\n", - "Iteration: 1900; Percent complete: 99.0%; Average loss: 0.0099\n", - "Iteration: 1910; Percent complete: 99.5%; Average loss: 0.0139\n", - "Iteration: 1920; Percent complete: 100.0%; Average loss: 0.0099\n", - "Validating!\n", - "Iteration: 1; Percent complete: 4.5%\n", - "Iteration: 2; Percent complete: 9.1%\n", - "Iteration: 3; Percent complete: 13.6%\n", - "Iteration: 4; Percent complete: 18.2%\n", - "Iteration: 5; Percent complete: 22.7%\n", - "Iteration: 6; Percent complete: 27.3%\n", - "Iteration: 7; Percent complete: 31.8%\n", - "Iteration: 8; Percent complete: 36.4%\n", - "Iteration: 9; Percent complete: 40.9%\n", - "Iteration: 10; Percent complete: 45.5%\n", - "Iteration: 11; Percent complete: 50.0%\n", - "Iteration: 12; Percent complete: 54.5%\n", - "Iteration: 13; Percent complete: 59.1%\n", - "Iteration: 14; Percent complete: 63.6%\n", - "Iteration: 15; Percent complete: 68.2%\n", - "Iteration: 16; Percent complete: 72.7%\n", - "Iteration: 17; Percent complete: 77.3%\n", - "Iteration: 18; Percent complete: 81.8%\n", - "Iteration: 19; Percent complete: 86.4%\n", - "Iteration: 20; Percent complete: 90.9%\n", - "Iteration: 21; Percent complete: 95.5%\n", - "Iteration: 22; Percent complete: 100.0%\n", - "Validation set accuracy: 64.84%\n" + "Iteration: 10; Percent complete: 0.5%; Average loss: 0.6942\n", + "Iteration: 20; Percent complete: 1.0%; Average loss: 0.6936\n" ] }, { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" + "ename": "KeyboardInterrupt", + "evalue": "", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[7], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mcraft_forecaster\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfit\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcorpus\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[1;32m 2\u001b[0m \u001b[43m \u001b[49m\u001b[43mpartial\u001b[49m\u001b[43m(\u001b[49m\u001b[43mgeneric_fit_selector\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msplit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mtrain\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[1;32m 3\u001b[0m \u001b[43m \u001b[49m\u001b[43mval_context_selector\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mpartial\u001b[49m\u001b[43m(\u001b[49m\u001b[43mgeneric_fit_selector\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msplit\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mval\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n", + "File \u001b[0;32m~/opt/anaconda3/envs/test/lib/python3.9/site-packages/convokit/forecaster/forecaster.py:119\u001b[0m, in \u001b[0;36mForecaster.fit\u001b[0;34m(self, corpus, context_selector, val_context_selector)\u001b[0m\n\u001b[1;32m 115\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m val_context_selector \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 116\u001b[0m val_contexts \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_create_context_iterator(\n\u001b[1;32m 117\u001b[0m corpus, val_context_selector, include_future_context\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m\n\u001b[1;32m 118\u001b[0m )\n\u001b[0;32m--> 119\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mforecaster_model\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfit\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcontexts\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mval_contexts\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 121\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\n", + "File \u001b[0;32m~/opt/anaconda3/envs/test/lib/python3.9/site-packages/convokit/forecaster/CRAFTModel.py:232\u001b[0m, in \u001b[0;36mCRAFTModel.fit\u001b[0;34m(self, contexts, val_contexts)\u001b[0m\n\u001b[1;32m 230\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mStarting Training!\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 231\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mWill train for \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m iterations\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(n_iteration))\n\u001b[0;32m--> 232\u001b[0m best_model \u001b[38;5;241m=\u001b[39m \u001b[43mtrainIters\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 233\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_voc\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 234\u001b[0m \u001b[43m \u001b[49m\u001b[43mtrain_pairs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 235\u001b[0m \u001b[43m \u001b[49m\u001b[43mval_pairs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 236\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoder\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 237\u001b[0m \u001b[43m \u001b[49m\u001b[43mcontext_encoder\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 238\u001b[0m \u001b[43m \u001b[49m\u001b[43mattack_clf\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 239\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoder_optimizer\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 240\u001b[0m \u001b[43m \u001b[49m\u001b[43mcontext_encoder_optimizer\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 241\u001b[0m \u001b[43m \u001b[49m\u001b[43mattack_clf_optimizer\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 242\u001b[0m \u001b[43m \u001b[49m\u001b[43membedding\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 243\u001b[0m \u001b[43m \u001b[49m\u001b[43mn_iteration\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 244\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_config\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mbatch_size\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 245\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_config\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mprint_every\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 246\u001b[0m \u001b[43m \u001b[49m\u001b[43mn_iter_per_epoch\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 247\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_config\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mclip\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 248\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_device\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 249\u001b[0m \u001b[43m \u001b[49m\u001b[43mMAX_LENGTH\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 250\u001b[0m \u001b[43m \u001b[49m\u001b[43mbatchIterator\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 251\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 253\u001b[0m \u001b[38;5;66;03m# save the resulting checkpoints so we can load them later during transform\u001b[39;00m\n\u001b[1;32m 254\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_model \u001b[38;5;241m=\u001b[39m best_model\n", + "File \u001b[0;32m~/opt/anaconda3/envs/test/lib/python3.9/site-packages/convokit/forecaster/CRAFT/runners.py:291\u001b[0m, in \u001b[0;36mtrainIters\u001b[0;34m(voc, pairs, val_pairs, encoder, context_encoder, attack_clf, encoder_optimizer, context_encoder_optimizer, attack_clf_optimizer, embedding, n_iteration, batch_size, print_every, validate_every, clip, device, max_length, batch_iterator_func)\u001b[0m\n\u001b[1;32m 288\u001b[0m dialog_lengths_list \u001b[38;5;241m=\u001b[39m [\u001b[38;5;28mlen\u001b[39m(x) \u001b[38;5;28;01mfor\u001b[39;00m x \u001b[38;5;129;01min\u001b[39;00m training_dialogs]\n\u001b[1;32m 290\u001b[0m \u001b[38;5;66;03m# Run a training iteration with batch\u001b[39;00m\n\u001b[0;32m--> 291\u001b[0m loss \u001b[38;5;241m=\u001b[39m \u001b[43mtrain\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 292\u001b[0m \u001b[43m \u001b[49m\u001b[43minput_variable\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 293\u001b[0m \u001b[43m \u001b[49m\u001b[43mdialog_lengths\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 294\u001b[0m \u001b[43m \u001b[49m\u001b[43mdialog_lengths_list\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 295\u001b[0m \u001b[43m \u001b[49m\u001b[43mutt_lengths\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 296\u001b[0m \u001b[43m \u001b[49m\u001b[43mbatch_indices\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 297\u001b[0m \u001b[43m \u001b[49m\u001b[43mdialog_indices\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 298\u001b[0m \u001b[43m \u001b[49m\u001b[43mlabels\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;66;43;03m# input/output arguments\u001b[39;49;00m\n\u001b[1;32m 299\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoder\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 300\u001b[0m \u001b[43m \u001b[49m\u001b[43mcontext_encoder\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 301\u001b[0m \u001b[43m \u001b[49m\u001b[43mattack_clf\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;66;43;03m# network arguments\u001b[39;49;00m\n\u001b[1;32m 302\u001b[0m \u001b[43m \u001b[49m\u001b[43mencoder_optimizer\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 303\u001b[0m \u001b[43m \u001b[49m\u001b[43mcontext_encoder_optimizer\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 304\u001b[0m \u001b[43m \u001b[49m\u001b[43mattack_clf_optimizer\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;66;43;03m# optimization arguments\u001b[39;49;00m\n\u001b[1;32m 305\u001b[0m \u001b[43m \u001b[49m\u001b[43mtrue_batch_size\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 306\u001b[0m \u001b[43m \u001b[49m\u001b[43mclip\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 307\u001b[0m \u001b[43m \u001b[49m\u001b[43mdevice\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 308\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;66;03m# misc arguments\u001b[39;00m\n\u001b[1;32m 309\u001b[0m print_loss \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m loss\n\u001b[1;32m 311\u001b[0m \u001b[38;5;66;03m# Print progress\u001b[39;00m\n", + "File \u001b[0;32m~/opt/anaconda3/envs/test/lib/python3.9/site-packages/convokit/forecaster/CRAFT/runners.py:111\u001b[0m, in \u001b[0;36mtrain\u001b[0;34m(input_variable, dialog_lengths, dialog_lengths_list, utt_lengths, batch_indices, dialog_indices, labels, encoder, context_encoder, attack_clf, encoder_optimizer, context_encoder_optimizer, attack_clf_optimizer, batch_size, clip, device)\u001b[0m\n\u001b[1;32m 108\u001b[0m labels \u001b[38;5;241m=\u001b[39m labels\u001b[38;5;241m.\u001b[39mto(device)\n\u001b[1;32m 110\u001b[0m \u001b[38;5;66;03m# Forward pass through utterance encoder\u001b[39;00m\n\u001b[0;32m--> 111\u001b[0m _, utt_encoder_hidden \u001b[38;5;241m=\u001b[39m \u001b[43mencoder\u001b[49m\u001b[43m(\u001b[49m\u001b[43minput_variable\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mutt_lengths\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 113\u001b[0m \u001b[38;5;66;03m# Convert utterance encoder final states to batched dialogs for use by context encoder\u001b[39;00m\n\u001b[1;32m 114\u001b[0m context_encoder_input \u001b[38;5;241m=\u001b[39m makeContextEncoderInput(\n\u001b[1;32m 115\u001b[0m utt_encoder_hidden, dialog_lengths_list, batch_size, batch_indices, dialog_indices\n\u001b[1;32m 116\u001b[0m )\n", + "File \u001b[0;32m~/opt/anaconda3/envs/test/lib/python3.9/site-packages/torch/nn/modules/module.py:1501\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1496\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m 1497\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m 1498\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m 1499\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m 1500\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1501\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1502\u001b[0m \u001b[38;5;66;03m# Do not call functions when jit is used\u001b[39;00m\n\u001b[1;32m 1503\u001b[0m full_backward_hooks, non_full_backward_hooks \u001b[38;5;241m=\u001b[39m [], []\n", + "File \u001b[0;32m~/opt/anaconda3/envs/test/lib/python3.9/site-packages/convokit/forecaster/CRAFT/model.py:35\u001b[0m, in \u001b[0;36mEncoderRNN.forward\u001b[0;34m(self, input_seq, input_lengths, hidden)\u001b[0m\n\u001b[1;32m 33\u001b[0m packed \u001b[38;5;241m=\u001b[39m torch\u001b[38;5;241m.\u001b[39mnn\u001b[38;5;241m.\u001b[39mutils\u001b[38;5;241m.\u001b[39mrnn\u001b[38;5;241m.\u001b[39mpack_padded_sequence(embedded, input_lengths\u001b[38;5;241m.\u001b[39mcpu())\n\u001b[1;32m 34\u001b[0m \u001b[38;5;66;03m# Forward pass through GRU\u001b[39;00m\n\u001b[0;32m---> 35\u001b[0m outputs, hidden \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mgru\u001b[49m\u001b[43m(\u001b[49m\u001b[43mpacked\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhidden\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 36\u001b[0m \u001b[38;5;66;03m# Unpack padding\u001b[39;00m\n\u001b[1;32m 37\u001b[0m outputs, _ \u001b[38;5;241m=\u001b[39m torch\u001b[38;5;241m.\u001b[39mnn\u001b[38;5;241m.\u001b[39mutils\u001b[38;5;241m.\u001b[39mrnn\u001b[38;5;241m.\u001b[39mpad_packed_sequence(outputs)\n", + "File \u001b[0;32m~/opt/anaconda3/envs/test/lib/python3.9/site-packages/torch/nn/modules/module.py:1501\u001b[0m, in \u001b[0;36mModule._call_impl\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1496\u001b[0m \u001b[38;5;66;03m# If we don't have any hooks, we want to skip the rest of the logic in\u001b[39;00m\n\u001b[1;32m 1497\u001b[0m \u001b[38;5;66;03m# this function, and just call forward.\u001b[39;00m\n\u001b[1;32m 1498\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m (\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_forward_pre_hooks\n\u001b[1;32m 1499\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_backward_pre_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_backward_hooks\n\u001b[1;32m 1500\u001b[0m \u001b[38;5;129;01mor\u001b[39;00m _global_forward_hooks \u001b[38;5;129;01mor\u001b[39;00m _global_forward_pre_hooks):\n\u001b[0;32m-> 1501\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mforward_call\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1502\u001b[0m \u001b[38;5;66;03m# Do not call functions when jit is used\u001b[39;00m\n\u001b[1;32m 1503\u001b[0m full_backward_hooks, non_full_backward_hooks \u001b[38;5;241m=\u001b[39m [], []\n", + "File \u001b[0;32m~/opt/anaconda3/envs/test/lib/python3.9/site-packages/torch/nn/modules/rnn.py:1001\u001b[0m, in \u001b[0;36mGRU.forward\u001b[0;34m(self, input, hx)\u001b[0m\n\u001b[1;32m 998\u001b[0m result \u001b[38;5;241m=\u001b[39m _VF\u001b[38;5;241m.\u001b[39mgru(\u001b[38;5;28minput\u001b[39m, hx, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_flat_weights, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mbias, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mnum_layers,\n\u001b[1;32m 999\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mdropout, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtraining, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mbidirectional, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mbatch_first)\n\u001b[1;32m 1000\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1001\u001b[0m result \u001b[38;5;241m=\u001b[39m \u001b[43m_VF\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mgru\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43minput\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mbatch_sizes\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mhx\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_flat_weights\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mbias\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1002\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mnum_layers\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdropout\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtraining\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mbidirectional\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1003\u001b[0m output \u001b[38;5;241m=\u001b[39m result[\u001b[38;5;241m0\u001b[39m]\n\u001b[1;32m 1004\u001b[0m hidden \u001b[38;5;241m=\u001b[39m result[\u001b[38;5;241m1\u001b[39m]\n", + "\u001b[0;31mKeyboardInterrupt\u001b[0m: " + ] } ], "source": [ @@ -1112,7 +215,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "id": "4d3e4892-f6ef-4b6f-a9e4-d318f8cb96b9", "metadata": { "scrolled": true @@ -1276,7 +379,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "id": "c7fa3d49-39c1-4dd4-9f8e-ca31f421ac5a", "metadata": {}, "outputs": [ @@ -1361,7 +464,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.9.0" } }, "nbformat": 4,