MCPcopy Create free account
hub / github.com/evilsocket/cake / load

Method load

cake-core/src/models/flux/flux2_vae.rs:23–27  ·  view source on GitHub ↗
(in_ch: usize, out_ch: usize, kernel: usize, padding: usize, vb: VarBuilder)

Source from the content-addressed store, hash-verified

21
22impl RawConv2d {
23 fn load(in_ch: usize, out_ch: usize, kernel: usize, padding: usize, vb: VarBuilder) -> Result<Self> {
24 let weight = vb.get((out_ch, in_ch, kernel, kernel), "weight")?;
25 let bias = vb.get(out_ch, "bias").ok();
26 Ok(Self { weight, bias, padding })
27 }
28
29 fn forward(&self, x: &Tensor, backend: &dyn ComputeBackend) -> Result<Tensor> {
30 backend.conv2d(x, &self.weight, self.bias.as_ref(), self.padding, 1, 1, 1)

Callers

nothing calls this directly

Calls 3

getMethod · 0.45
pushMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected