junyanz / CycleGAN

Software that can generate photos from paintings, turn horses into zebras, perform style transfer, and more.
Other
12.34k stars 1.94k forks source link

About 'L1-norm' in cycle-consistency loss function #134

Closed Michi-123 closed 4 years ago

Michi-123 commented 4 years ago

Cycle-consistency loss function is using 'L1-norm'. I think it is because G(F(x)) is very near to domain x.
x and x^ should be like this: x [1.0, 1.0, 1.0, 0.0, 0.0, ...] x^ [1.0, 1.0, 0.9, 0.1, 0.1, ...] Since almost of all values should have same, the distance is near to zero. So I think L1-norm is useful than L2 norm. Is this idea right?

junyanz commented 4 years ago

Both L1-norm and L2-norm can be used and results should not change a lot. L1-norm might produce slightly sharper results.

Michi-123 commented 4 years ago

Thank you very much .