chmncc.explanations package
Submodules
chmncc.explanations.gradients module
Module which deals with the explaination we can retrieve out of the images
- chmncc.explanations.gradients.compute_integrated_gradient(batch_x: Tensor, batch_blank: Tensor, model: Module) Tensor [source]
Integrated gradients computation Implementation taken from https://github.com/CVxTz/IntegratedGradientsPytorch/blob/main/code/mlp_gradient.py
- Parameters:
batch (batch_x [torch.Tensor] data instances) –
zeros (batch_blank [torch.Tensor] batch of) –
network (model [torch.nn.Module]) –
- Returns:
integrated_gradients [torch.Tensor] integrated gradients
Module contents
Explainations For now, they are simply grandients based