X = torch.empty(5, 3)

it is not working. Giving error

Traceback (most recent call last):
File “”, line 1, in
AttributeError: module ‘torch’ has no attribute ‘empty’

Can you maybe a bigger script for us to test out ?
Did you check that your installation of pytorch was done without problems ?

make sure your pytorch is 0.4.0+