The const parameter must be part a parameter of the implementing type, or of the trait, or an associated item derivable from otherwise constrained parameters and the trait and the implementing type. I.e. an implementation must be identifiable from the implementing type and the trait alone. (RFC 0447.)
For this particular example, if it compiled, there would be 65,536 implementations of Module for each Linear<IN, OUT> (one for every possible BATCH). Modulo specialization (which is not stable and wouldn't cover this particular case anyway), there can be at most one implementation of a trait per type.
More generally, note that associated types are considered the "outputs" of an implementation  you can only have one for a given implementation.
Perhaps BATCH should be a parameter ("input") of Module instead. (Or of fn forward.)
error[E0207]: the const parameter BATCH is not constrained by the impl trait, self type, or predicates
> src/modules/linear.rs:41:7

41  impl <const BATCH: u16, const IN: u16, const OUT: u16>Module for Linear<IN, OUT> {
 ^^^^^^^^^^^^^^^^ unconstrained const parameter

= note: expressions using a const parameter must map each value to a distinct output value
= note: proving the result of expressions other than the parameter are unique is not supported
For more information about this error, try rustc explain E0207.
That's close to what I want, but I need the BATCH in both the input and output to be the same. If someone passes in a tensor with a batch of 10, the output needs a batch of 10. I don't think this method enforces that.
It takes a single BATCH parameter, then forwards that parameter to both Self::Input and Self::Output. This way, both the input and output batches must be identical for the method to resolve.
As a side note, one alternative with stable Rust would be to add the BATCH parameter to Module itself (Rust Playground):