I am really sorry, I forgot about this. There was a bug in the way I was loading the data which was causing the weights to go None. Perhaps it had nothing to do with the loss function.
Thanks a lot for your concern though.