//! Demonstrates how to use a transformer module on nightly rust. fn main() { use dfdx::prelude::*; let dev = AutoDevice::default(); type Model = Transformer<16, 4, 3, 3, 8>; let t = dev.build_module::(); let grads = t.alloc_grads(); let src: Tensor, f32, _> = dev.sample_normal(); let tgt: Tensor, f32, _> = dev.sample_normal(); let _: Tensor, _, _, _> = t.forward((src.trace(grads), tgt)); }