1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Common neural network modules
//!
//! This module re-exports all neural network layers from the organized `layers` module.
//! The layers have been split into separate files for better maintainability and to comply
//! with the 2000-line file size limit.
// Re-export all layers from the layers module
pub use crate::layers::*;
// For backward compatibility, also re-export specific layer types
pub use crate::layers::{
AdaptiveAvgPool2d,
AvgPool2d,
// Normalization layers
BatchNorm2d,
// Convolutional layers
Conv1d,
Conv2d,
Conv3d,
// Regularization layers
Dropout,
// Embedding layers
Embedding,
GroupNorm,
InstanceNorm1d,
InstanceNorm2d,
InstanceNorm3d,
// LayerNorm from normalization module (main one)
// AdvancedLayerNorm from advanced module (transformer-specific)
LeakyReLU,
// Linear layers
Linear,
LogSoftmax,
// Pooling layers
MaxPool2d,
// Attention layers
MultiheadAttention,
// Activation functions
ReLU,
Sigmoid,
Softmax,
Tanh,
// Transformer layers
Transformer,
TransformerEncoder,
TransformerEncoderLayer,
GELU,
GRU,
LSTM,
// Recurrent layers
RNN,
};