Hi there,
Apologies if this is a basic question. I did go a bit of search but didn’t find quite what I have in mind.
Given a model (the forward function) and a given loss, is it possible to find the gradient in the input layer?
For example, take AllenNLP’s BiDAF model 2. it has a forward function which defines the network structure, given the inputs, and at some point, it also defines the loss function 2.
The question is, for a fixed input, how can I get the gradients in the input layer?