LayerGradCAMExplanation<T>
Models & Types · AiDotNet.Interpretability.Explainers
GradCAM explanation result.
Constructors
| Constructor |
Summary |
LayerGradCAMExplanation(Vector<T> input, Matrix<T> gradcamMap, Tensor<T> upsampledMap, int targetClass, T prediction, int layerHeight, int layerWidth, int[] inputShape) |
Initializes a new LayerGradCAM explanation. |
Properties
| Property |
Summary |
Matrix<T> GradCAMMap { get; } |
Gets the GradCAM activation map. |
T Prediction { get; } |
Gets the prediction score. |
Tensor<T> UpsampledMap { get; } |
Gets the upsampled map (if available). |
Vector<T> Input { get; } |
Gets the original input. |
int LayerHeight { get; } |
Gets the layer height. |
int LayerWidth { get; } |
Gets the layer width. |
int TargetClass { get; } |
Gets the target class. |
int[] InputShape { get; } |
Gets the input shape. |
Methods
| Method |
Summary |
IEnumerable<ValueTuple<int, int, T>> GetTopRegions(int k) |
Gets top activated regions. |
Matrix<T> GetNormalizedMap() |
Gets normalized GradCAM map (0-1 range). |
string ToString() |
Returns string representation. |