chainer.optimizer.Hyperparameter

class chainer.optimizer.Hyperparameter(parent=None)[source]

Set of hyperparameter entries of an optimizer.

This is a utility class to provide a set of hyperparameter entries for update rules and an optimizer. Each entry can be set as an attribute of a hyperparameter object.

A hyperparameter object can hold a reference to its parent hyperparameter object. When an attribute does not exist in the child hyperparameter, it automatically refers to the parent. We typically set the hyperparameter of the gradient method as the parent of the hyperparameter of each update rule. It enables us to centralize the management of hyperparameters (e.g. we can change the learning rate of all update rules just by modifying the hyperparameter of the central optimizer object), while users can freely customize the hyperparameter of each update rule if needed.

Parameters

parent (Hyperparameter) – Parent hyperparameter.

Methods

get_dict()[source]

Converts the hyperparameter into a dictionary.

Returns

Dictionary containing all entries that can be referred by this hyperparameter object.

__eq__(value, /)

Return self==value.

__ne__(value, /)

Return self!=value.

__lt__(value, /)

Return self<value.

__le__(value, /)

Return self<=value.

__gt__(value, /)

Return self>value.

__ge__(value, /)

Return self>=value.

Attributes

parent

Parent hyperparameter object.