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
use crateDyn;
/// Marker trait for optional module parameters (e.g., bias tensors).
///
/// Three types implement this trait:
/// * [`True`] - The parameter always exists. `build` takes no extra arg.
/// * [`False`] - The parameter never exists. `build` takes no extra arg.
/// * [`Dyn`] - Whether the parameter exists is decided at runtime via a `bool` passed to `build`.
///
/// There is no `build()` method or associated `BuildArgs` - each layer provides
/// dedicated `impl` blocks with the exact signature matching each variant.
/// The parameter should **always** exist.
;
/// The parameter should **never** exist.
;
/// The parameter's existence is decided at runtime (pass a `bool` to `build`).
/// This reuses the existing [`Dyn`] struct from the prelude.