tuners package

Subpackages

Submodules

tuners.cdpg_tuner module

class tuners.cdpg_tuner.CDPGTuner(*args, context_distribution=<disco.distributions.single_context_distribution.SingleContextDistribution object>, **kwargs)[source]

Bases: Tuner

Contextual DPG tuning class, relying on a ContextDistribution and KLLoss().

tuners.dpg_tuner module

class tuners.dpg_tuner.DPGTuner(*args, context='', **kwargs)[source]

Bases: CDPGTuner

DPG tuning class, a specific case of CDPG with a single, fixed, context.

tuners.tuner module

class tuners.tuner.Tuner(model, target, proposal=None, context_distribution=<disco.distributions.single_context_distribution.SingleContextDistribution object>, loss=<disco.tuners.losses.kl.KLLoss object>, features=[], track_metrics=['kl', 'tv', 'js'], track_divergence_from_base=False, **params)[source]

Bases: object

Generic tuning class.

default_params = {'context_sampling_size': 16, 'divergence_evaluation_interval': 16, 'learning_rate': 1.41e-05, 'n_gradient_steps': 1024, 'n_samples_per_step': 1024, 'optimizer': 'Adam', 'proposal_update_metric': 'kl', 'sampling_size': 32, 'scheduler': 'constant', 'scoring_size': 64, 'warmup_steps': 12}
report_feature_moments(context, samples, proposal_log_scores, model_log_scores, target_log_scores)[source]
tune()[source]

Fine-tunes model distribution’s network

Fine-tunes the network of the model distribution:
  • repeats n_gradient_steps tuning steps

  • eventually updates the samplee according to KL divergence

Module contents