Initializer module
- nnodely.support.initializer.init_constant(indexes, params_size, dict_param={'value': 1})[source]
Initializes parameters to a constant value.
- Parameters:
dict_param (dict, optional) –
- Dictionary containing the initialization parameters. Default is {‘value’: 1}.
- valueint or float
The constant value to initialize the parameters with.
- nnodely.support.initializer.init_negexp(indexes, params_size, dict_param={'first_value': 1, 'lambda': 3, 'size_index': 0})[source]
Initializes parameters using a negative decay exponential function.
- Parameters:
indexes (list) – List of indexes for the parameters.
params_size (list) – List of sizes for each dimension of the parameters.
dict_param (dict, optional) –
- Dictionary containing the initialization parameters. Default is {‘size_index’: 0, ‘first_value’: 1, ‘lambda’: 3}.
- size_indexint
The index of the dimension to apply the exponential function.
- first_valueint or float
The value at the start of the range.
- lambdaint or float
The decay rate parameter of the exponential function.
- nnodely.support.initializer.init_exp(indexes, params_size, dict_param={'lambda': 3, 'max_value': 1, 'monotonicity': 'decreasing', 'size_index': 0})[source]
Initializes parameters using an increasing or decreasing exponential function.
- Parameters:
indexes (list) – List of indexes for the parameters.
params_size (list) – List of sizes for each dimension of the parameters.
dict_param (dict, optional) –
- Dictionary containing the initialization parameters. Default is {‘size_index’: 0, ‘max_value’: 1, ‘lambda’: 3, ‘monotonicity’: ‘decreasing’}.
- size_indexint
The index of the dimension to apply the exponential function.
- max_valueint or float
The maximum value of the exponential function.
- lambdaint or float
The rate parameter of the exponential function.
- monotonicitystr
The monotonicity of the exponential function. Can be ‘increasing’ or ‘decreasing’.
- Raises:
ValueError – If the monotonicity is not ‘increasing’ or ‘decreasing’.
- nnodely.support.initializer.init_lin(indexes, params_size, dict_param={'first_value': 1, 'last_value': 0, 'size_index': 0})[source]
Initializes parameters using a linear function.
- Parameters:
indexes (list) – List of indexes for the parameters.
params_size (list) – List of sizes for each dimension of the parameters.
dict_param (dict, optional) –
- Dictionary containing the initialization parameters. Default is {‘size_index’: 0, ‘first_value’: 1, ‘last_value’: 0}.
- size_indexint
The index of the dimension to apply the linear function.
- first_valueint or float
The value at the start of the range.
- last_valueint or float
The value at the end of the range.