Initializations

Registered Initializations

Module contents

class olympus.models.inits.Initializer(name, seed=0, **kwargs)[source]

Bases: object

Lazy Initializer

Attributes:
initializer

Methods

__call__(model) Call self as a function.
get_current_space() Get currently defined parameter space
get_space() Return the dimension space of each parameters
init  
get_current_space()[source]

Get currently defined parameter space

get_space()[source]

Return the dimension space of each parameters

init(override=False, **kwargs)[source]
initializer
exception olympus.models.inits.RegisteredInitNotFound[source]

Bases: Exception

olympus.models.inits.get_initializers_space()[source]
olympus.models.inits.initialize_weights(model, name=None, seed=0, half=False, **kwargs)[source]

Initialize the model weights using a particular method

Parameters:
model: Module
name: str

Name of the initializer

seed: int

seed to use for the PRNGs

Returns:
The initialized model
olympus.models.inits.known_initialization()[source]
olympus.models.inits.register_initialization(name, factory, override=False)[source]