Fist of all, thanks for this great package. I am trying to adapt these gradient functions for sentence classification deep models created by keras (you may see the code here). The saliency function works completely fine. However, when I modify the GuidedBackprop for my case, it gives the error below in :
AttributeError: 'NoneType' object has no attribute 'outer_context'> <ipython-input-102-3cc50a22f302>(23)guided_backprop()22 imported_x =guided_graph.get_tensor_by_name(loaded_model.layers[1].inbound_nodes[0].input_tensors[0].name)---> 23 guided_grads_node = tf.gradients(imported_y, imported_x)24
Do you thinks what is the reason for this error? Can you please help me to solve this issue?
As you may see, I just changed imported_x to be able to get tensor's real name (because otherwise, it gives another error which is ValueError: The name 'dropout_1' looks like an (invalid) Operation name, not a Tensor. Tensor names must be of the form "<op_name>:<output_index>".).
Hi,
Fist of all, thanks for this great package. I am trying to adapt these gradient functions for sentence classification deep models created by keras (you may see the code here). The saliency function works completely fine. However, when I modify the GuidedBackprop for my case, it gives the error below in :
AttributeError: 'NoneType' object has no attribute 'outer_context'
> <ipython-input-102-3cc50a22f302>(23)guided_backprop()
22 imported_x =
guided_graph.get_tensor_by_name(loaded_model.layers[1].inbound_nodes[0].input_tensors[0].name)
---> 23 guided_grads_node = tf.gradients(imported_y, imported_x)
24
Do you thinks what is the reason for this error? Can you please help me to solve this issue?As you may see, I just changed imported_x to be able to get tensor's real name (because otherwise, it gives another error which is
ValueError: The name 'dropout_1' looks like an (invalid) Operation name, not a Tensor. Tensor names must be of the form "<op_name>:<output_index>".
).Regards, Nader