Backprob policy

Hey Guys,
i have a dqn network. I want to backward my policy for a given input trough my network to get the state back.
I want to use this to get the most mayor indices in my input vector for a policy if i change the policy a bit.