There might be another PyTorch installation.
As you can see, you’ve uninstalled torch-0.4.0, then reinstalled it, but version 0.3.0.post4 is loaded.
Try to run the uninstall command several times until an error message occurs saying there are no torch installations.
Otherwise, could you try to create a new “clean” colab notebook?
I had similar issues with some package installations.