Closed Feywell closed 4 years ago
Could you elaborate on this bug or provide some error logs? This code makes sense for me.
Actually it doesn't return a error. It is not work, when normlize is False. Because I do not use normlize to prepare my own dataset.
It doesn't make sense to me, since the normalize
flag only affects a linear normalization. What do you mean by "it is not work"? Does your program exit normally?
If you use normlize=True, this code just ok. But It will go to https://github.com/mit-han-lab/gan-compression/blob/master/utils/util.py#L81 , when I set normlize=False.
So, I change it like follow:
one_image_np = tensor2im(one_image, imtype=imtype, normalize=normalize)
I see. Thanks for reporting this. You could also send a pull request.
The normlize is not work, when tensor.dim() == 4.
https://github.com/mit-han-lab/gan-compression/blob/master/utils/util.py#L69