pydbm package

Subpackages

Submodules

pydbm.params_initializer module

class pydbm.params_initializer.ParamsInitializer

Bases: object

Params Initializer.

sample

Random sampling.

Parameters:
  • sizeint or tuple of int of output shape.
  • **kwargs – Parameters other than size to be input to function sample_f.
Returns:

Returns by sample_f.

pydbm.synapse_list module

class pydbm.synapse_list.Synapse

Bases: object

The object of synapse.

create_node

Set links of nodes to the graphs.

Parameters:
  • shallower_neuron_count – The number of neurons in shallower layer.
  • deeper_neuron_count – The number of neurons in deeper layer.
  • shallower_activating_function – The activation function in shallower layer.
  • deeper_activating_function – The activation function in deeper layer.
  • weights_arr – The pre-learned weights of links. If this array is not empty, ParamsInitializer.sample_f will not be called and weights_arr will be refered as initial weights.
  • scale – Scale of parameters which will be ParamsInitializer.
  • params_initializer – is-a ParamsInitializer.
  • params_dictdict of parameters other than size to be input to function ParamsInitializer.sample_f.
deeper_activating_function

getter

diff_weights_arr

getter

get_deeper_activating_function

getter

get_diff_weights_arr

getter

get_shallower_activating_function

getter

get_weights_arr

getter

learn_weights

Update the weights of links.

load_pre_learned_params

Load pre-learned parameters.

If you want to load pre-learned parameters simultaneously with stacked graphs, call method stack_graph and setup the graphs before calling this method.

If this class’s subclass has a ActivatingFunctionInterface which has a BatchNorm, and your file stores appropriate data, this class set BatchNorm’s beta_arr and gamma_arr.

Parameters:file_path – File path.
save_pre_learned_params

Save pre-learned parameters.

If you want to save pre-learned parameters simultaneously with stacked graphs, call method stack_graph and setup the graphs before calling this method.

If this class’s subclass has a ActivatingFunctionInterface which has a BatchNorm, this class store BatchNorm’s beta_arr and gamma_arr to your file.

Parameters:file_path – File path.
set_deeper_activating_function

setter

set_diff_weights_arr

setter

set_shallower_activating_function

setter

set_weights_arr

setter

shallower_activating_function

getter

weights_arr

getter

Module contents