dacapo.gp.gamma_noise

Attributes

logger

Classes

GammaAugment

Class for applying gamma noise augmentation.

Module Contents

dacapo.gp.gamma_noise.logger
class dacapo.gp.gamma_noise.GammaAugment(arrays, gamma_min, gamma_max)

Class for applying gamma noise augmentation.

arrays

An iterable collection of np arrays to augment

gamma_min

A float representing the lower limit of gamma perturbation

gamma_max

A float representing the upper limit of gamma perturbation

setup()

Method to configure the internal state of the class

process()

Method to apply gamma noise to the desired arrays

__augment()

Private method to perform the actual augmentation

arrays
gamma_min
gamma_max
setup()

Configuring the internal state by iterating over arrays.

Raises:

AssertionError – If the array data type is not float32 or float64

Examples

>>> setup()
setup()
process(batch, request)

Method to apply gamma noise to the desired arrays.

Parameters:
  • batch – The input batch to be processed.

  • request – An object which holds the requested output location.

Returns:

The batch with the gamma noise applied.

Raises:

AssertionError – If the array data type is not float32 or float64

Examples

>>> process(batch, request)
process(batch, request)