# pylissom.nn.functional¶

## pylissom.nn.functional.functions module¶

pylissom.nn.functional.functions.linear_decay(w, start, epoch, final_epoch)[source]
pylissom.nn.functional.functions.kill_neurons(w, threshold)[source]
pylissom.nn.functional.functions.piecewise_sigmoid(min_theta, max_theta, inp)[source]
pylissom.nn.functional.functions.check_compatible_mul(module_one, module_two)[source]

Checks that two modules have correct sizes for matrix multiplication

pylissom.nn.functional.functions.check_compatible_add(module_one, module_two)[source]

Checks that two modules have correct sizes for matrix addition

## pylissom.nn.functional.weights module¶

This module contains functions that modify the weights of the neural network.

pylissom.nn.functional.weights.apply_fn_to_weights_between_maps(in_features, out_features, fn, **kwargs)[source]

The goal of this function is to apply a function fn, to all the elements of an array of dimension rows_dims_source x rows_dims_source (the lower array) centered on an element of the superior array. The elements of the array would be the weights of the superior layer, with the inferior layer, i.e., it modifies the weights of each one of the neurons of the superior layer, with respect to all the neurons of the inferior layer.

ASSUMES SQUARE MAPS PROBLEMAS? OJO QUE EL STEP PUEDE SER UN FLOAT

Parameters: in_features – out_features – fn – The function applied to the weights **kwargs – Optional parameters to fn An array containing the new weights of the superior layer.
pylissom.nn.functional.weights.get_gaussian_weights[source]

Returns a Tensor of size in_features x out_features with each column weight representing a Gaussian Disk

pylissom.nn.functional.weights.circular_mask[source]

Creates a boolean mask representing valid connective radius

pylissom.nn.functional.weights.apply_circular_mask_to_weights(matrix, radius)[source]

This functions applies a circular mask to a matrix of weights. The weights of the neurons that are more far than the radius, will have its weight set to zero.

Parameters: matrix – Tensor of weights. The rows are the neurons. The columns the weights of the neuron. radius – The radius of neighborhood.

Returns: