pub struct GaConv<'a> {
pub inp: GaLin<'a>,
pub taps: &'a [f32],
pub bias: &'a [f32],
pub kernel: usize,
pub mean_w: &'a [f32],
pub out: GaLin<'a>,
}Expand description
A layer’s convolution module: inp gives [n, 2·dim] (the stream, then
its gate); the stream goes through a depthwise convolution over time
(taps is [kernel][dim], (kernel − 1) / 2 zero frames on both sides,
bias [dim]) and gets the segment’s mean times mean_w added; then
out(silu((conv + mean)·σ(gate))).
Fields§
§inp: GaLin<'a>§taps: &'a [f32]§bias: &'a [f32]§kernel: usize§mean_w: &'a [f32]§out: GaLin<'a>Auto Trait Implementations§
impl<'a> !RefUnwindSafe for GaConv<'a>
impl<'a> !UnwindSafe for GaConv<'a>
impl<'a> Forget for GaConv<'a>
impl<'a> Freeze for GaConv<'a>
impl<'a> Move for GaConv<'a>
impl<'a> Send for GaConv<'a>
impl<'a> Sync for GaConv<'a>
impl<'a> Unpin for GaConv<'a>
impl<'a> UnsafeUnpin for GaConv<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more