3.1.1.7.2.3. opengate.source.GANSourceConditionalPairsGenerator

3.1.1.7.2.3.1. Module Contents

3.1.1.7.2.3.1.1. Classes

GANSourceConditionalPairsGenerator

Generate pairs of particles with a GAN, considering conditional vectors.

class opengate.source.GANSourceConditionalPairsGenerator.GANSourceConditionalPairsGenerator(user_info, sphere_radius, generate_condition_function)[source]

Bases: opengate.source.GANSourceDefaultGenerator.GANSourceDefaultGenerator

Generate pairs of particles with a GAN, considering conditional vectors.

The parameter sphere_radius is required : it is the radius of the sphere that surround the source during the training.

__getstate__()[source]
generate_condition(n)[source]
generator(source)[source]

Main function that will be called from the cpp side every time a batch of particles should be created. Once created here, the particles are copied to cpp. (Yes maybe the copy could be avoided, but I did not manage to do it)