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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! Neural network layer module: submodule declarations, the shared
//! [`TrainingParameters`](crate::neural_network::layers::TrainingParameters) classification, and helpers for parameter-free layers
/// Classifies a layer by its parameter training capability
///
/// Layers fall into 3 groups: those with trainable parameters (e.g. Dense,
/// convolutional layers), those whose parameters are frozen, and those with no
/// parameters at all (e.g. pooling, activation layers)
/// A module containing activation layer implementations for neural networks
/// Convolution-internal helpers (output assembly, gradient accumulation, padding)
/// Convolutional layer for neural networks
/// Dense (Fully Connected) layer implementation for neural networks
/// A layer that flattens a 3D, 4D, or 5D tensor into a 2D tensor
/// Container for different types of neural network layer weights
/// Pooling layer for neural networks
/// Recurrent layer for neural networks
/// A module containing regularization layers for neural networks
/// Model-level serialization scaffolding (whole-model snapshot and load-time weight application)
/// Output-shape calculators for pooling and convolution layers
/// Shared input/weight validation for the layer module
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
/// Generates the trait method stubs for layers without trainable parameters
///
/// Such layers rely on the default [`Layer::parameters`] (an empty list, so the optimizer
/// skips them); this macro supplies the remaining required `param_count` and `get_weights`
///
/// It is path-exported via a `pub(in ...) use` re-export, so callers import it explicitly
/// rather than depending on textual macro ordering:
/// `use crate::neural_network::layers::no_trainable_parameters_layer_functions;`
///
/// The generated `param_count` returns `TrainingParameters::NoTrainable` and `get_weights`
/// returns `LayerWeight::Empty`
pub use no_trainable_parameters_layer_functions;