GenerationPipeline¶
- class pyraug.pipelines.GenerationPipeline(model, sampler=None)[source]¶
This pipelines allows to generate new samples from a pre-trained model
- Parameters
model (BaseVAE) – The model you want ot generate from
sampler (BaseSampler) – The sampler to use to sampler from the model
Warning
You must ensure that the sampler used handled the model provided
Tip
remember that a model can be easily reloaded from a folder using
load_from_folder
.Example for a
RHVAE
>>> from pyraug.models import RHVAE >>> model_rec = RHVAE.load_from_folder('path/to_model_folder')
- __call__(samples_number)[source]¶
Launch the data generation and save it in
output_dir
stated in theBaseSamplerConfig
. A foldergeneration_YYYY-MM-DD_hh-mm-ss
is created and data is saved in.pt
files in this created folder. Ifoutput_dir
is None, data is saved indummy_output_dir/generation_YYYY-MM-DD_hh-mm-ss
- Parameters
samples_number (int) – The number of samples to generate