glow-pytorch icon indicating copy to clipboard operation
glow-pytorch copied to clipboard

How to compute NLL value ?

Open odie2630463 opened this issue 6 years ago • 4 comments

Hi , I try to base your code run on MNIST , but I get negative value loss . How can I compute NLL value per dims ? Sorry , maybe is a stupid question . Thanks !

odie2630463 avatar Mar 10 '19 18:03 odie2630463

Maybe you need to modify these parts https://github.com/rosinality/glow-pytorch/blob/master/train.py#L85 as MNIST is 1 channel images. And you might need to change n_bits parameters.

rosinality avatar Mar 11 '19 01:03 rosinality

Thank your reply , I changed n_bits=5 and images shape , but I get about value about -1.8 . The glow paper they report NLL value in figure is about 3.xx . So , I need to do like this 5 - 1.8 = 3.2 ?

odie2630463 avatar Mar 11 '19 02:03 odie2630463

Printed loss itself is NLL, so it should be positive. I think there are some problems in training.

rosinality avatar Mar 11 '19 03:03 rosinality

Thanks ! I will check my code !

odie2630463 avatar Mar 11 '19 03:03 odie2630463