Field Pair Network¶
Field pair network module.
This module contains functionality for instantiating, training, and using a field pair matching networks.
- class neer_match.field_pair_network.FieldPairNetwork(size, initial_width_scale=10, depth=2, **kwargs)¶
Field pair network class.
The class creates networks for matching pairs of fields from two datasets.
- size¶
The size of the input feature vectors.
- Type:
int
- initial_width_scale¶
The initial width scale of the hidden layers.
- Type:
int
- depth¶
The depth of the network.
- Type:
int
- __init__(size, initial_width_scale=10, depth=2, **kwargs)¶
Initialize a field pair network object.
The network depth is determined from the depth parameter. The width of each hidden layer is determined by the initial width scale and the number of input features. The first hidden layer has a width of size * initial_width_scale, the second has a width of size * initial_width_scale / 2, and so on. The output layer has a sigmoid activation function.
- Parameters:
size (
int
) – The size of the input feature vectors.initial_width_scale (
int
) – The initial width scale of the hidden layers.depth (
int
) – The depth of the network.**kwargs – Additional keyword arguments passed to parent class (
tensorflow.keras.Model()
).
- build(input_shape)¶
Build the network.
- Return type:
None
- call(inputs)¶
Run the network on inputs.
- Return type:
Tensor
- get_config()¶
Return the network configuration.
- Return type:
dict