From 3f186ab0726c3bdfeca8698051b500a1251a22d8 Mon Sep 17 00:00:00 2001 From: rasbt Date: Sun, 25 Feb 2024 08:47:25 -0600 Subject: [PATCH] use .shape instead of .size() for consistency --- ch04/01_main-chapter-code/ch04.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch04/01_main-chapter-code/ch04.ipynb b/ch04/01_main-chapter-code/ch04.ipynb index 2eaecee..7111d55 100644 --- a/ch04/01_main-chapter-code/ch04.ipynb +++ b/ch04/01_main-chapter-code/ch04.ipynb @@ -756,7 +756,7 @@ " # Compute the output of the current layer\n", " layer_output = layer(x)\n", " # Check if shortcut can be applied\n", - " if self.use_shortcut and x.size() == layer_output.size():\n", + " if self.use_shortcut and x.shape == layer_output.shape:\n", " x = x + layer_output\n", " else:\n", " x = layer_output\n",