From 663431d1eeeb5653d7adaca34bc3670441cdbc26 Mon Sep 17 00:00:00 2001 From: Pedro Pereira Date: Sun, 17 Jan 2021 18:07:21 +0000 Subject: [PATCH] Fix create_head initialization in 15_arch_details.ipynb (#383) Fixed as per the solution in https://forums.fast.ai/t/chapter-15-fastai-book-issue-siamese-training-running-mean/84534 --- 15_arch_details.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/15_arch_details.ipynb b/15_arch_details.ipynb index ac87199..2c86f66 100644 --- a/15_arch_details.ipynb +++ b/15_arch_details.ipynb @@ -350,7 +350,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Then we can create our head. A look at the encoder tells us the last layer has 512 features, so this head will need to receive `512*4`. Why 4? First we have to multiply by 2 because we have two images. Then we need a second multiplication by 2 because of our concat-pool trick. So we create the head as follows:" + "Then we can create our head. A look at the encoder tells us the last layer has 512 features, so this head will need to receive `512*2`. Why 2? We have to multiply by 2 because we have two images. So we create the head as follows:" ] }, { @@ -359,7 +359,7 @@ "metadata": {}, "outputs": [], "source": [ - "head = create_head(512*4, 2, ps=0.5)" + "head = create_head(512*2, 2, ps=0.5)" ] }, { @@ -813,4 +813,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} \ No newline at end of file +}