Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

gnn_weight.h File Reference

#include <gsl/gsl_matrix.h>
#include "gnn_node.h"

Include dependency graph for gnn_weight.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

gnn_nodegnn_weight_new (int input_size, int output_size)
 Creates a new gnn_weight : Affine / Linear Transform layer.

int gnn_weight_init (gnn_node *node)
 Initializes the layer's parameters.

gsl_matrix * gnn_weight_get_A (gnn_node *node)
 Gets the node's parameter matrix .

gsl_vector * gnn_weight_get_B (gnn_node *node)
 Gets the node's parameter vector .

gsl_matrix * gnn_weight_get_dA (gnn_node *node)
 Gets .

gsl_vector * gnn_weight_get_dB (gnn_node *node)
 Gets .

gsl_matrix_int * gnn_weight_get_Af (gnn_node *node)
 Gets the frozen flags for the matrix .

gsl_vector_int * gnn_weight_get_Bf (gnn_node *node)
 Gets the frozen flags for the vector .

int gnn_weight_connect (gnn_node *node, size_t i, size_t j, double strength)
 Connect an input with an output.

int gnn_weight_disconnect (gnn_node *node, size_t i, size_t j)
 Disconnect an input with an output.

int gnn_weight_connect_all (gnn_node *node, double strength)
 Creates a full connection.

int gnn_weight_disconnect_all (gnn_node *node)
 Disconnect all connections.

int gnn_weight_connect_input (gnn_node *node, size_t i, double strength)
 Connects the i-th input to all outputs with given strength.

int gnn_weight_disconnect_input (gnn_node *node, size_t i)
 Disconnect the i-th input from all outputs.

int gnn_weight_freeze_connection (gnn_node *node, size_t i, size_t j)
 Freeze a connection.

int gnn_weight_unfreeze_connection (gnn_node *node, size_t i, size_t j)
 Unfreeze a connection.

int gnn_weight_freeze_all_connections (gnn_node *node)
 Freeze all connections.

int gnn_weight_unfreeze_all_connections (gnn_node *node)
 Unfreeze all connections.

int gnn_weight_connect_bias (gnn_node *node, size_t j, double strength)
 Connects a bias.

int gnn_weight_disconnect_bias (gnn_node *node, size_t j)
 Disconnects a bias.

int gnn_weight_freeze_bias (gnn_node *node, size_t j)
 Freeze a bias.

int gnn_weight_unfreeze_bias (gnn_node *node, size_t j)
 Unfreeze a bias.

int gnn_weight_freeze_all_biases (gnn_node *node)
 Freeze all biases.

int gnn_weight_unfreeze_all_biases (gnn_node *node)
 Unfreeze all biases.


Function Documentation

int gnn_weight_connect gnn_node   node,
size_t    i,
size_t    j,
double    strength
 

Connects the i-th input to the j-th output with the given strength and unfreezes it.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
i  The index of the input.
j  The index of the output.
strength  The strength of the connection.
Returns:
Returns 0 if suceeded.

Definition at line 594 of file gnn_weight.c.

int gnn_weight_connect_all gnn_node   node,
double    strength
 

Connects the all input to the outputs with the given strength. The connections will be unfrozen.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
strength  The strength of the connection.
Returns:
Returns 0 if suceeded.

Definition at line 655 of file gnn_weight.c.

int gnn_weight_connect_bias gnn_node   node,
size_t    j,
double    strength
 

Connects the bias associated with the j-th output with the given strength. The value will be unfrozen.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
j  The index of the output associated to the bias.
strength  The strength of the connection.
Returns:
Returns 0 if suceeded.

Definition at line 907 of file gnn_weight.c.

int gnn_weight_connect_input gnn_node   node,
size_t    i,
double    strength
 

Connects the input at index i to all outputs with the given strengh strength. The connections will be unfrozen.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
i  The input's index.
strength  The strength of the connections.
Returns:
Returns 0 if suceeded.

Definition at line 714 of file gnn_weight.c.

int gnn_weight_disconnect gnn_node   node,
size_t    i,
size_t    j
 

Disconnects the i-th input to the j-th output. The weight will be frozen to 0.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
i  The index of the input.
j  The index of the output.
Returns:
Returns 0 if suceeded.

Definition at line 625 of file gnn_weight.c.

int gnn_weight_disconnect_all gnn_node   node
 

Disconnects all connections. The weights will be frozen to 0.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
Returns:
Returns 0 if suceeded.

Definition at line 683 of file gnn_weight.c.

int gnn_weight_disconnect_bias gnn_node   node,
size_t    j
 

Disconnects the bias associated with the j-th output. The value will be frozen to 0.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
j  The index of the output associated to the bias.
Returns:
Returns 0 if suceeded.

Definition at line 937 of file gnn_weight.c.

int gnn_weight_disconnect_input gnn_node   node,
size_t    i
 

Disconnects the i-th input from all outputs. The weights will be frozen to 0.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
i  The input's index.
Returns:
Returns 0 if suceeded.

Definition at line 755 of file gnn_weight.c.

int gnn_weight_freeze_all_biases gnn_node   node
 

Freezes all biases.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
Returns:
Returns 0 if suceeded.

Definition at line 1077 of file gnn_weight.c.

int gnn_weight_freeze_all_connections gnn_node   node
 

Freezes all the connections.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
Returns:
Returns 0 if suceeded.

Definition at line 852 of file gnn_weight.c.

int gnn_weight_freeze_bias gnn_node   node,
size_t    j
 

Freezes the bias associated to the j-th output.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
j  The index of the output.
Returns:
Returns 0 if suceeded.

Definition at line 1024 of file gnn_weight.c.

int gnn_weight_freeze_connection gnn_node   node,
size_t    i,
size_t    j
 

Freezes the connection from the i-th input to he j-th output.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
i  The index of the input.
j  The index of the output.
Returns:
Returns 0 if suceeded.

Definition at line 797 of file gnn_weight.c.

gsl_matrix* gnn_weight_get_A gnn_node   node
 

This function a pointer to the node's internal parameter matrix . Its values can be freely modified, but after changes are made, the gnn_node_local_update function should be called.

Parameters:
node  A pointer to a gnn_weight : Affine / Linear Transform.
Returns:
A pointer to a matrix.

Definition at line 431 of file gnn_weight.c.

gsl_matrix_int* gnn_weight_get_Af gnn_node   node
 

This function returns a pointer to the node's internal matrix frozen flags. Its values can be freely modified, but after changes are made, the gnn_node_local_update function should be called. Remember that these values should be binary, beeing either 0 (free) or 1 (frozen).

Parameters:
node  A pointer to a gnn_weight : Affine / Linear Transform.
Returns:
A pointer to a matrix.

Definition at line 526 of file gnn_weight.c.

gsl_vector* gnn_weight_get_B gnn_node   node
 

This function a pointer to the node's internal parameter vector . Its values can be freely modified, but after changes are made, the gnn_node_local_update function should be called.

Parameters:
node  A pointer to a gnn_node.
Returns:
A pointer to a vector.

Definition at line 454 of file gnn_weight.c.

gsl_vector_int* gnn_weight_get_Bf gnn_node   node
 

This function returns a pointer to the node's internal vector frozen flags. Its values can be freely modified, but after changes are made, the gnn_node_local_update function should be called. Remember that these values should be binary, beeing either 0 (free) or 1 (frozen).

Parameters:
node  A pointer to a gnn_node.
Returns:
A pointer to a vector.

Definition at line 550 of file gnn_weight.c.

gsl_matrix* gnn_weight_get_dA gnn_node   node
 

This function a pointer to the node's internal parameter matrix gradient . Its values can be freely modified, but after changes are made, the gnn_node_local_update function should be called.

Parameters:
node  A pointer to a gnn_weight : Affine / Linear Transform.
Returns:
A pointer to a matrix.

Definition at line 478 of file gnn_weight.c.

gsl_vector* gnn_weight_get_dB gnn_node   node
 

This function a pointer to the node's internal parameter vector gradient . Its values can be freely modified, but after changes are made, the gnn_node_local_update function should be called.

Parameters:
node  A pointer to a gnn_node.
Returns:
A pointer to a vector.

Definition at line 502 of file gnn_weight.c.

int gnn_weight_init gnn_node   node
 

This functions initializes the layer's parameters by values drawn from a uniform distribution with mean zero and standard deviation

to insure that each of the outputs are approximately .

Implementation Note: The numbers are generated by

where is drawn from a uniform distribution in .

Parameters:
layer  A pointer to a gnn_weight : Affine / Linear Transform node.
Returns:
Returns 0 on success.

Definition at line 383 of file gnn_weight.c.

gnn_node* gnn_weight_new int    input_size,
int    output_size
 

This function creates a new gnn_node of gnn_weight : Affine / Linear Transform type.

Parameters:
input_size  The node's input size.
output_size  The node's output size.
Returns:
A new node.

Definition at line 296 of file gnn_weight.c.

int gnn_weight_unfreeze_all_biases gnn_node   node
 

Unfreezes all biases.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
Returns:
Returns 0 if suceeded.

Definition at line 1103 of file gnn_weight.c.

int gnn_weight_unfreeze_all_connections gnn_node   node
 

Unfreezes all the connections.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
Returns:
Returns 0 if suceeded.

Definition at line 878 of file gnn_weight.c.

int gnn_weight_unfreeze_bias gnn_node   node,
size_t    j
 

Unfreezes the bias associated to the j-th output.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
j  The index of the output.
Returns:
Returns 0 if suceeded.

Definition at line 1051 of file gnn_weight.c.

int gnn_weight_unfreeze_connection gnn_node   node,
size_t    i,
size_t    j
 

Unfreezes the connection going from the i-th input to the j-th output.

Parameters:
node  A gnn_weight : Affine / Linear Transform node.
i  The index of the input.
j  The index of the output.
Returns:
Returns 0 if suceeded.

Definition at line 826 of file gnn_weight.c.


Generated on Sun Jun 13 20:51:28 2004 for libgnn Gradient Retropropagation Machine Library by doxygen1.2.18