I think my trouble may have been solved.
In the tutorial 1 and github page, they all write like this nn.Linear(16*6*6, 120).
However, they write nn.Linear(16*5*5, 120) in the colab 3.
And I can run the code in colab with no error raised.
Obviously,there are some thing wrong with the code in the tutorial and github of PyTorch
Thank you anyway!