pyhgf.model.conv.conv_patch_network#
- pyhgf.model.conv.conv_patch_network(in_features, out_channels, key=None, strategy='he', leaf_kwargs=None, layer_kwargs=None, network_kwargs=None)[source]#
Build a fresh 2-layer
DeepNetworkcomputing one conv kernel’s map.Same shape as
from_linear()(one weight matrix, bias folded in as the input layer’s constant node), initialised fromkeyrather than copied from an existing layer. This network is the conv kernel itself, shared across every patch byDeepNetworkAdapter’s per-row batching.- Parameters:
in_features (int) –
in_channels * kh * kw, the flattened patch size.out_channels (int) – Number of output feature maps this kernel produces.
key (Array | None) – PRNG key for weight initialisation.
strategy (str) – Forwarded to
DeepNetwork.weight_initialisation()(default"he", the scaling for the rectifier-style nonlinearity each conv block applies).leaf_kwargs (dict | None) – Extra
add_layerkeyword arguments for the bottom (output) layer, such as the backprop-parity configuration.layer_kwargs (dict | None) – Extra
add_layerkeyword arguments for the top (input) layer.network_kwargs (dict | None) – Constructor arguments for the
DeepNetworkitself, such asfeedforward_uncertainty. These reach the network’s state when it is built and cannot be set afterwards, so they belong here rather than in the per-layer keyword sets.
- Return type: