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

Function test_second_order_step_shape

cake-core/src/models/vibevoice/ddpm.rs:272–281  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

270
271 #[test]
272 fn test_second_order_step_shape() {
273 let sched = DpmSolverPP::new_cosine(1000, 20);
274 let m0 = Tensor::randn(0f32, 1., (1, 64), &Device::Cpu).unwrap();
275 let m1 = Tensor::randn(0f32, 1., (1, 64), &Device::Cpu).unwrap();
276 let sample = Tensor::randn(0f32, 1., (1, 64), &Device::Cpu).unwrap();
277 let result = sched
278 .second_order_update(&m0, &m1, 949, 999, 899, &sample)
279 .unwrap();
280 assert_eq!(result.dims(), &[1, 64]);
281 }
282
283 #[test]
284 fn test_full_loop_converges() {

Callers

nothing calls this directly

Calls 1

second_order_updateMethod · 0.80

Tested by

no test coverage detected