ProcessMode, minibatch: &MyMiniBatch) { let xs = &minibatch.xs; let ys = &minibatch.ys; // Create Nodes for inputs let xs = F::input(([], xs.len() as u32), xs); let ys = F::input(([], ys.len() as u32), ys); // Set namespace when computing log probability rvm.namespace_logp = "model/".to_string(); // Observation rvm.add_sample("y".to_string(), ys); // Prior let w = rvm.process("w", &Normal::new(&const_node(0.0), &const_node(1.0)), mode); let b = rvm.process("b", &Normal::new(&const_node(0.0), &const_node(1.0)), mode); // Linear regression let ys_pred = w * xs + b; let _ = rvm.process("y", &Normal::new(&ys_pred, &const_node(0.1)), mode); }; Ϣʔβଆ࣮ɿ֬Ϟσϧ