Indeed, but it’s not the same debugging in colab than debugging in a local machine with a proper IDE.
It’s also a waste of time to keep reading code which is not related to the problem, to wait for colab to initialize and download packages and a long list of etceteras.
If there’s a problem in a network, the simplest case is to provide something like:
class Mynet(nn.Module):
  init...
  forward(x):
  ...

model= Mynet(...)
output =model(torch.rand(A,B,C))

So that copying those few lines of code we can reproduce it not paying attention to a bigger bunch of code.