Closed 98mxr closed 1 year ago
That alone won't fix it, since the network is expecting RGB. Simply reverse the channels in your image and you're good to go
I use LPIPS as a loss for backward. Reverse img channels after forward will cause my model to fail to converge. I tried many times and located the problem on reverse img channels. It is estimated that this operation caused the gradient On the problem, I can't even clamping img to (-1, 1).
I modified my model so that reverse can work well, thank you for your reply.
I want to use LPIPS on BGR img instead of RGB img, can I just swap the order of mean/std in ScalingLayer?