model_validators
Architecture model validators.
model_matching_in_out_channels(model)
#
Validate that the UNet model has the same number of channel inputs and outputs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model | UNetModel | Model to validate. | required |
Returns:
Type | Description |
---|---|
UNetModel | Validated model. |
Raises:
Type | Description |
---|---|
ValueError | If the model has different number of input and output channels. |
Source code in src/careamics/config/validators/model_validators.py
model_without_final_activation(model)
#
Validate that the UNet model does not have the final_activation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model | UNetModel | Model to validate. | required |
Returns:
Type | Description |
---|---|
UNetModel | The validated model. |
Raises:
Type | Description |
---|---|
ValueError | If the model has the final_activation attribute set. |
Source code in src/careamics/config/validators/model_validators.py
model_without_n2v2(model)
#
Validate that the Unet model does not have the n2v2 attribute.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model | UNetModel | Model to validate. | required |
Returns:
Type | Description |
---|---|
UNetModel | The validated model. |
Raises:
Type | Description |
---|---|
ValueError | If the model has the |