neuralmonkey.config.normalize module

Module for configuration normalization.

The [main] configuration section contains arguments that can be filled with different types of values, e.g. trainer can be either a single trainer object or a list of them. This module provides functions for unifying the configuration interface.

neuralmonkey.config.normalize.normalize_configuration(cfg: argparse.Namespace, train_mode: bool) → None

Given a configuration namespace, normalize the values it contains.

Parameters:
  • cfg – The namespace object returned by Configuration.make_namespace
  • train_mode – Boolean flag controlling normalization of parameters only used during training.