![]() |
Belle II Software
light-2303-iriomote
|


Public Member Functions | |
| def | __init__ (self, number_features, hidden_feature_shape=[30, 30, 30, 30], activation=tanh, **kwargs) |
| def | build (self, input_shape) |
| def | call (self, inputs) |
| def | compute_output_shape (self, input_shape) |
| def | get_config (self) |
Public Attributes | |
| number_features | |
| Number of features. More... | |
| number_groups | |
| Number of groups in input. | |
| hidden_feature_shape | |
| shape of hidden layers used for extracting relations | |
| activation | |
| activation used for hidden layer in shared weights. More... | |
| group_len | |
| how many neurons has one comparable object | |
| weightvariables | |
| saves weights for call | |
| combinations | |
| number of relation combinations | |
| question_len | |
| 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 126 of file keras_relational.py.
| def __init__ | ( | self, | |
| number_features, | |||
hidden_feature_shape = [30, 30, 30, 30], |
|||
activation = tanh, |
|||
| ** | kwargs | ||
| ) |
Init class.
Definition at line 135 of file keras_relational.py.
| def build | ( | self, | |
| input_shape | |||
| ) |
Build all weights for Relations Layer :param input_shape: Input shape of tensor :return: Nothing
Definition at line 159 of file keras_relational.py.
| def call | ( | self, | |
| inputs | |||
| ) |
Compute Relational Layer :param inputs: input tensor :return: output tensor
Definition at line 192 of file keras_relational.py.
| def compute_output_shape | ( | self, | |
| input_shape | |||
| ) |
Compute Output shape :return: Output shape
Definition at line 214 of file keras_relational.py.
| def get_config | ( | self | ) |
Config required for saving parameters in keras model.
Definition at line 230 of file keras_relational.py.
| activation |
activation used for hidden layer in shared weights.
For output sigmoid will always be used.
Definition at line 147 of file keras_relational.py.
| number_features |
Number of features.
Number of different shared weights used for comparison for each relation.
Definition at line 141 of file keras_relational.py.