jonbarron / robust_loss_pytorch

A pytorch port of google-research/google-research/robust_loss/
Apache License 2.0
656 stars 88 forks source link

Expected image dim order and value range? #22

Open kgrm opened 3 years ago

kgrm commented 3 years ago

Hello, from the documentation of the library it is unclear whether the image variants of the loss function (e.g., AdaptiveImageLossFunction) expect images in NCHW or NHWC order. Furthermore, should the input value range be [0, 1] or [0, 255]?

chenzhekl commented 3 years ago

I guess it doesn't matter. The AdaptiveLossFunction only accepts rank-2 tensors, where the innermost dimension is the batch and the outermost dimension is the feature. All residual images must be flattened before feeding into the loss function.