Skip to content
Snippets Groups Projects
Commit 257f53a8 authored by Daniel CARRON's avatar Daniel CARRON :b:
Browse files

[doc] Doc fixes

parent 3240277a
No related branches found
No related tags found
1 merge request!15Update documentation
Pipeline #83643 passed
......@@ -48,7 +48,6 @@ class RawDataLoader(_BaseRawDataLoader):
where to find the image to be loaded, and an integer, representing the
sample label.
Returns
-------
The sample representation.
......
......@@ -68,6 +68,7 @@ def _calculate_road_scores(
Returns
-------
tuple[float, float, float]
A 3-tuple containing floating point numbers representing the
most-relevant-first average score (``morf``), least-relevant-first
average score (``lerf``) and the combined value (``(lerf-morf)/2``).
......@@ -143,6 +144,15 @@ def _process_sample(
A sequence of percentiles (percent x100) integer values indicating the
proportion of pixels to perturb in the original image to calculate both
MoRF and LeRF scores.
Returns
-------
list
A list containing the following items for a particular sample:
* The relative path to the sample.
* The label.
* An index to the specified target_class.
* The computed ROAD scores.
"""
name: str = sample[1]["name"][0]
......
......@@ -24,7 +24,19 @@ def _create_saliency_map_callable(
target_layers: list[torch.nn.Module] | None,
use_cuda: bool,
):
"""Creates a class activation map (CAM) instance for a given model."""
"""Creates a class activation map (CAM) instance for a given model.
Parameters
----------
algo_type
The algorithm to use for saliency map estimation.
model
Neural network model (e.g. pasa).
target_layers
The target layers to compute CAM for.
use_cuda
Whether to use cuda or not.
"""
import pytorch_grad_cam
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment