Saliency maps of neural networks (using Keras)

后端 未结 1 1896

I have a fully connected multilayer perceptron trained in Keras. I feed it an N-dimensional feature vector and it predicts one out of M classes for the input vector. The trainin

相关标签:
1条回答
  • 2021-02-01 10:26

    I found the solution:

        get_output = theano.function([model.layers[0].input],model.layers[-1].output,allow_input_downcast=True)
        fx = theano.function( [model.layers[0].input] ,T.jacobian(model.layers[-1].output.flatten(),model.layers[0].input), allow_input_downcast=True)
        grad = fx([input_feature])
    
    0 讨论(0)
提交回复
热议问题