Try to overfit a small dataset first, e.g. just 10 samples, by playing around with some hyperparameters (e.g. the learning rate) and make sure your model is able to do so.
Also, don’t append the loss directly to a list via:
LOSS.append(loss)

if you don’t want to call LOSS.backward() at some point, as it would store the complete computation graph and would thus increase the memory usage.
Use LOSS.append(loss.item()) instead.