I think that Poisson loss function is not supported by default in PyTorch. You may try this:

  
    
    
    [Solved] How to implement custom loss function? 
  
  
    I’ve read your loss function 
but I can’t see what is the difference except you use torch and F’s operation (like torch.mean(), F.softplus()) at the end of each function 
This is code I’m writing 
https://github.com/youngminpark2559/test/tree/master/update_CNN

Would you tell me what is the difference? 
Generating network 
https://github.com/youngminpark2559/test/blob/master/update_CNN/train/train.py#L65

Obtaining prediction 
https://github.com/youngminpark2559/test/blob/master/update_CNN/train…
  


BTW, I think that one should focus on loss functions that can manage learning rates self adaption instead of probabilities.