![]() |
Belle II Software development
|
Public Member Functions | |
__init__ (self, number_features, hidden_feature_shape=[30, 30, 30, 30], activation=tanh, **kwargs) | |
build (self, input_shape) | |
call (self, inputs) | |
compute_output_shape (self, input_shape) | |
get_config (self) | |
Public Attributes | |
number_features = number_features | |
Number of features. | |
int | number_groups = 0 |
Number of groups in input. | |
hidden_feature_shape = hidden_feature_shape | |
shape of hidden layers used for extracting relations | |
activation = activations.get(activation) | |
activation used for hidden layer in shared weights. | |
int | group_len = 0 |
how many neurons has one comparable object | |
list | weightvariables = [] |
saves weights for call | |
int | combinations = 0 |
number of relation combinations | |
int | question_len = 0 |
size of second input vector | |
This is a class which implements Relational Layer into Keras. See Class Relations for details. EnhanceRelations use an additional input for passing event information to every comparison: RN(O) = f_phi(sum_phi(g_theta(o_i,o_j,q))) q is fed in as second one dimensional input.
Definition at line 125 of file keras_relational.py.
__init__ | ( | self, | |
number_features, | |||
hidden_feature_shape = [30, 30, 30, 30], | |||
activation = tanh, | |||
** | kwargs ) |
Init class.
Definition at line 134 of file keras_relational.py.
build | ( | self, | |
input_shape ) |
Build all weights for Relations Layer :param input_shape: Input shape of tensor :return: Nothing
Definition at line 158 of file keras_relational.py.
call | ( | self, | |
inputs ) |
Compute Relational Layer :param inputs: input tensor :return: output tensor
Definition at line 191 of file keras_relational.py.
compute_output_shape | ( | self, | |
input_shape ) |
Compute Output shape :return: Output shape
Definition at line 213 of file keras_relational.py.
get_config | ( | self | ) |
Config required for saving parameters in keras model.
Definition at line 229 of file keras_relational.py.
activation = activations.get(activation) |
activation used for hidden layer in shared weights.
For output sigmoid will always be used.
Definition at line 146 of file keras_relational.py.
combinations = 0 |
number of relation combinations
Definition at line 152 of file keras_relational.py.
int group_len = 0 |
how many neurons has one comparable object
Definition at line 148 of file keras_relational.py.
hidden_feature_shape = hidden_feature_shape |
shape of hidden layers used for extracting relations
Definition at line 144 of file keras_relational.py.
number_features = number_features |
Number of features.
Number of different shared weights used for comparison for each relation.
Definition at line 140 of file keras_relational.py.
int number_groups = 0 |
Number of groups in input.
Definition at line 142 of file keras_relational.py.
int question_len = 0 |
size of second input vector
Definition at line 154 of file keras_relational.py.
list weightvariables = [] |
saves weights for call
Definition at line 150 of file keras_relational.py.