care_module
CARE Lightning DataModule.
CAREModule
#
Bases: UnetModule
CAREamics PyTorch Lightning module for CARE algorithm.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
algorithm_config | CAREAlgorithm or dict | Configuration for the CARE algorithm, either as a CAREAlgorithm instance or a dictionary. | required |
Source code in src/careamics/lightning/dataset_ng/lightning_modules/care_module.py
__init__(algorithm_config)
#
Instantiate CARE DataModule.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
algorithm_config | CAREAlgorithm or dict | Configuration for the CARE algorithm, either as a CAREAlgorithm instance or a dictionary. | required |
Source code in src/careamics/lightning/dataset_ng/lightning_modules/care_module.py
training_step(batch, batch_idx)
#
Training step for CARE module.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch | (ImageRegionData, ImageRegionData) | A tuple containing the input data and the target data. | required |
batch_idx | Any | The index of the current batch in the training loop. | required |
Returns:
Type | Description |
---|---|
Any | The loss value computed for the current batch. |
Source code in src/careamics/lightning/dataset_ng/lightning_modules/care_module.py
validation_step(batch, batch_idx)
#
Validation step for CARE module.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch | (ImageRegionData, ImageRegionData) | A tuple containing the input data and the target data. | required |
batch_idx | Any | The index of the current batch in the training loop. | required |