yaringal / multi-task-learning-example

A multi-task learning example for the paper https://arxiv.org/abs/1705.07115
MIT License
838 stars 205 forks source link

Log var can become negative and explode #14

Open snie2012 opened 3 years ago

snie2012 commented 3 years ago

The loss function can optimize in a way that keep decreasing the log_var values, which I observe in my experiments. One simple solution is to do torch.abs(log_var). Any thoughts on how this might affect the formulation of the deductions?

YangLeiSX commented 2 years ago

I have encountered the same situation during my training, do you have any better solutions?