There's a function NetPortGradient, but I can't figure out how it works.
To give a specific example (with poetic license of the notation), consider the image
x = ExampleData[{"TestImage","Flower"}]
The probability <flower|orchid>[x] in the ImageIdentify network is 0.182434
Then a Newton quotient can be defined:
y[[row, column, channel]] = Limit[h -> 0, (<flower|orchid>[ReplacePart[x,{row, column, channel} -> x[[row, column, channel]] + h]] - 0.182434) / h]
That is, the functional derivative of the identification probability with respect to each pixel.
How can this image be found?