dacapo.gp.reject_if_empty
Attributes
Classes
Reject batches based on the masked-in vs. masked-out ratio. |
Module Contents
- dacapo.gp.reject_if_empty.logger
- class dacapo.gp.reject_if_empty.RejectIfEmpty(gt=None, p=0.5, background=0)
Reject batches based on the masked-in vs. masked-out ratio. .. attribute:: gt
The gt array to use
- type:
ArrayKey, optional
- p
The probability that we reject until gt is nonempty
- Type:
float, optional
- Method:
setup: Set up the provider. provide: Provide a batch.
- gt
- p
- background = 0
- setup()
Set up the provider.
- Raises:
AssertionError – If only 1 upstream provider is supported.
Examples
>>> setup() setup()
- provide(request)
Provides a batch of data, rejecting empty ground truth (gt) if requested.
- Parameters:
request – The request object containing the necessary information.
- Returns:
The batch of data.
- Raises:
AssertionError – If the requested gt is not present in the request.
Examples
>>> provide(request) provide(request)