use burn::{Tensor, module::Module, prelude::Backend, tensor::backend::AutodiffBackend}; #[derive(Debug, Module)] pub struct LIF { pub v: Tensor, } impl LIF { pub fn new(device: &B::Device) -> Self { Self { v: Tensor::zeros([1], device), } } } impl LIF { pub fn forward(&mut self, input: Tensor) -> Tensor { input } pub fn backward(&mut self, x: Tensor) -> Tensor { x } }