marcoancona / DeepExplain

A unified framework of perturbation and gradient-based attribution methods for Deep Neural Networks interpretability. DeepExplain also includes support for Shapley Values sampling. (ICLR 2018)
https://arxiv.org/abs/1711.06104
MIT License
720 stars 133 forks source link

"None value not supported" when i use the code in multi_modal segmentation #51

Open miss1997yuan opened 4 years ago

miss1997yuan commented 4 years ago

hi,can you help me ,i have met the "None value not supported" when i try to use the code in medical pet-ct image segmentation ,i am embrassed to find the problem ,the special point is the input is two picture for ct and pet image,and the output segmentation logits is not as size [batch,num_classes],it is about the size[batch,h,w,num_classes] for i try to calculate the all pixels' grad in the sapce of image ad [h,w] have no idea of is it possible to use the technology in the segmentation task rather than classification ,would you mind giving me some suggestion ?

marcoancona commented 4 years ago

I am afraid this is not supported by DeepExplain. The output is expected to be of shape [batch, n_classes]. Also, how would that work for image segmentation? Would you generate one heatmap for each of your h*w*num_classes outputs? Seems difficult to handle to me.