mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2025-12-16 09:39:32 +00:00
use .shape instead of .size() for consistency
This commit is contained in:
parent
cdcd73ba7f
commit
3f186ab072
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user