BaseStruct

Description

Base class for all masks. It serves as a boilerplate for other masks. It is not meant to be used directly.

Parameters

Parameter Default Required Type Description
dims [1, 100, 1] list Dimensions of the network, must be a list of three integers [input_dim, hidden_size, output_dim]  

Methods

Methods that are shared by all structures.

Method Description
get_input_idx() Get indices of neurons that receive input.
get_readout_idx() Get indices of neurons that readout from.
get_non_input_idx() Get indices of neurons that don’t receive input.
visualize() Visualize the generated masks.
get_masks() Return a list of np.ndarray masks. It will be of length 3, where the first element is the input mask, the second element is the hidden mask, and the third element is the readout mask. For those structures that do not have specification for a certain mask, it will be an all-one matrix.
get_areas() Get a list of areas names.
get_area_idx() Get indices of neurons in a specific area. The parameter area could be either a string from the get_areas() or a index of the area.

results matching ""

    No results matching ""