Hanane SEBBAQ
Hanane SEBBAQ
Hello; I have the same issue: I need to apply the Integrated gradients to a multi-task model with two inputs and two outputs. but I'm getting a Graph disconnected error...
new_model=tf.keras.models.load_model(my_wd, custom_objects={'f1_score': f1_score, 'precision' : precision, 'recall' : recall, 'AdamWeightDecay' : optimizer}) new_model.summary() ![image](https://user-images.githubusercontent.com/35919412/134311880-42ad3ce8-13e2-499c-a23f-d70328a0c860.png) from tensorflow.keras.models import Model predictions = pred_class explanations = [] for out in new_model.output: for inp...
Hello; can i share it in private with you please? Regards
OK i will share it. I have a question about the actual version of IG : does it support multiple input and multiple output models?
Ok, thank you for your feedback. in this case what is the parameter target to pass to the explain function. Because in my case I have two outputs.
Hello; After using the workaround that you proposed, i get this error X_test=[X1_test,X2_test] nb_samples = 10 X_test_sample = X_test[:nb_samples] Z1=np.asarray(X_test_sample[0]['input_word_ids']) Z2=np.asarray(X_test_sample[1]['input_word_ids']) Z=[Z1,Z2] from tensorflow.keras.models import Model predictions = pred_class explanations...
Thank you for your help I tried this : X1_test = bert_encode(x1_test, tokenizerSaved, 151) X_test_sample=x1_test[:10] X_test_sample1=bert_encode(X_test_sample, tokenizerSaved, 151) print(X1_test) print('................................................................*****************************************') print(X_test_sample1['input_word_ids']) kwargs = {k:v for k,v in X_test_sample1.items() if k...
the input is below, it's not an array but a tensor. Did IG requires an array as input ?: tf.Tensor( [[ 101 10212 27876 ... 0 0 0] [ 101...
Hello i used bumpy to convert the input tensor to an array explanation = ig.explain(X_test_sample1['input_word_ids'].numpy(), forward_kwargs=kwargs, baselines=None, target=None) this time i got this error. Please help me ! --------------------------------------------------------------------------- ValueError...