Does Mxnet have a symbol to support adversarial training


#1

I would like to conduct the experiment based on adversarial learning.
Is it possible to easily add a layer which acts as an identity transformation in forwarding propagation and changes its sign of loss in backpropagation?


#2

Hi @richard

You can certainly implement your own custom operator with different forward and backward methods (https://mxnet.incubator.apache.org/tutorials/gluon/customop.html), but do you really need to do this for adversarial training? I can see an example of DCGAN in the repository that might be useful for you (https://github.com/apache/incubator-mxnet/blob/master/example/gluon/dcgan.py).


#3

Thanks, the custom operator works fine~
BTW, do you have any idea of how to weighted the multi-losses using module?


#4

You can simply add the losses with the weights that you want to apply.


#5

Ah, I missed the scale attribute~