pycsamt.ai.nets.resnet#

1-D Residual CNN for EM inversion — Liu et al. (2021) I8RFCN style.

Skip (residual) connections allow training very deep 1-D CNNs without vanishing gradients, enabling the network to learn both coarse resistivity contrasts (long-range dependencies) and fine-grained frequency patterns (short-range) simultaneously.

Three residual stages progressively double the channel width while halving the spatial resolution. A global average-pool collapses the spatial dimension before the final linear output head.

References

Liu, W. et al. (2021). Deep learning AMT inversion using residual-based deep convolutional neural network. Journal of Geophysics and Engineering, 18(6), 876-888.

Classes

ResNet1DNet(n_features, n_out, *[, ...])

Factory wrapper for the 1-D residual CNN.

class pycsamt.ai.nets.resnet.ResNet1DNet(n_features, n_out, *, channels=(64, 128, 256), dropout=0.3, n_blocks=2)[source]#

Bases: object

Factory wrapper for the 1-D residual CNN.

Parameters:
  • n_features (int) – Input feature-vector length.

  • n_out (int) – Output parameter vector length (2*n_layers - 1).

  • channels (sequence of int) – Filter counts for the three residual stages. Default (64, 128, 256) replicates the I8RFCN paper.

  • dropout (float) – Dropout before the final linear layer.

  • n_blocks (int) – Number of residual blocks per stage (default 2).

build()[source]#

Return the nn.Module.