hy2dl.utils

hy2dl.utils.get_distribution(distribution: str) BaseDistribution

Get distribution object, depending on the run configuration.

Parameters:

cfg (Config) – The run configuration.

Returns:

A new distribution instance of the type specified in the config.

Return type:

distribution.BaseDistribution