facebookresearch / TorchRay

Understanding Deep Networks via Extremal Perturbations and Smooth Masks
Other
344 stars 33 forks source link

Semantic segmenation based architecture #12

Open abhigoku10 opened 4 years ago

abhigoku10 commented 4 years ago

@vedaldi @likethesky thanks for open sourcing the code , is it possible to use this method for semantic segmentation based architecture/models

ruthcfong commented 4 years ago

@abhigoku10 Thanks for your comment. Although we have not tried using our attribution methods on semantic segmentation architectures, this can be done.

You would likely need to change the way the backward gradient is computed, i.e., write your own function to replace get_backward_gradient and pass it in as a parameter.

See the saliency function definition, which is used for most backprop-based methods; when using extremal perturbation, pass your new function as the parameter named reward_func.

Let me know if you have any other questions.