torch.cat in this version 1.0.0:
>>> torch.__version__
'1.0.0'
>>> t1 = torch.randn(3, 5, 5)
>>> t2 = torch.randn(4, 5, 5)
>>> t = torch.cat([t1, t2], dim=0)
>>> t.shape
torch.Size([7, 5, 5])

Can you verify that you are using pytorch version 1.0.0? Sometimes when I use Jupyter notebook, the jupyter kernel is launched from a different python executable. Then I have seen that right after installing the newest pytorch, my jupyter was still showing the older version.