I can’t see any obvious issues in your code besides the usage of the deprecated Variable and the unsupported usage of the .data attribute, so you should remove them.
Once this is done, try to overfit a small dataset, e.g. just 10 samples by playing around with some hyperparameters. Once your model is able to overfit this dataset, try to scale up the use case again.