That’s weird, I also expect that behaviour, but the code in that git has that issue when I run on my machine and also Colab. Maybe it’s something specific to that repo. Below is a screenshot of the problem I’ve described on my machine and output before and after nn.Linear.forward() call
python version : 3.7.12 (default, Sep 10 2021, 00:21:48)  [GCC 7.5.0]
torch version : 1.9.0+cu111
cudnn version : 8005
# ------------------------- Options -------------------------
mode                         : 0   # 0 for debug
description                  : net_1024
device                       : "3"
epochs                       : 40000
gammas                       : [0.1, 0.1, 0.1]
schedule                     : [10000, 20000, 30000]
learning_rate                : 0.001
optimizer                    : Adam
entirety                     : True
model                        : net_1024
# ----------------------- God Save Me -----------------------
save_model                   : True
dampening                    : 0.9
lr_patience                  : 10
momentum                     : 0.9
decay                        : 0.0005
start_epoch                  : 0
print_freq                   : 10
checkpoint                   : 10
n_threads                    : 2
result                       : result
# --------------------------- End ---------------------------

-------------------------- initialization --------------------------
initializing sequence 02 ...
initialize 02 done
------------------------------ done --------------------------------

training final

/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at  /pytorch/c10/core/TensorImpl.h:1156.)
  return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
before torch.Size([1, 1792])
after torch.Size([1, 64])

Here’s a screenshot of my Pycharm debugger showing the issue

image1529×366 68.7 KB