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

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