If calculating the shapes is too cumbersome, you could just print the shape of y0 before passing it to the linear layer:
print(y0.shape)
y0 = self.fc0(y0)

After the next crash, you’ll get the shape of your tensor and can adapt the number of input features in your layer accordingly.