How can I use fast gradient sign method in triple losses?

Hi
in the triple loss network, we have three inputs. Suppose that one of the inputs is used to make an adversarial example, the fast gradient sign method is applied.
my question is how can I compute the gradient of my adv image using this structure. Shall I compute the gradient? am I use triple losses here?

thanks in advance