n2v_module
Noise2Void Lightning DataModule.
N2VModule
#
Bases: UnetModule
CAREamics PyTorch Lightning module for N2V algorithm.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
algorithm_config | N2VAlgorithm or dict | Configuration for the N2V algorithm, either as an N2VAlgorithm instance or a dictionary. | required |
Source code in src/careamics/lightning/dataset_ng/lightning_modules/n2v_module.py
__init__(algorithm_config)
#
Instantiate N2V DataModule.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
algorithm_config | N2VAlgorithm or dict | Configuration for the N2V algorithm, either as an N2VAlgorithm instance or a dictionary. | required |
Source code in src/careamics/lightning/dataset_ng/lightning_modules/n2v_module.py
training_step(batch, batch_idx)
#
Training step for N2V model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch | ImageRegionData or (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 for the current training step. |
Source code in src/careamics/lightning/dataset_ng/lightning_modules/n2v_module.py
validation_step(batch, batch_idx)
#
Validation step for N2V model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
batch | ImageRegionData or (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 |