Skip to content

Commit

Permalink
Fix the tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentMazare committed Sep 12, 2024
1 parent 21dfa55 commit 40ec5f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/var_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ fn init_test() {
"{}",
"ortho_norm initialization failed {ortho_norm}"
);
let ortho_shape_fail = tch::nn::f_init(Init::Orthogonal { gain: 1.0 }, &[10], Device::Cpu);
let ortho_shape_fail =
tch::nn::f_init(Init::Orthogonal { gain: 1.0 }, &[10], Device::Cpu, tch::Kind::Float);
assert!(ortho_shape_fail.is_err());
let kaiming_u = vs.root().var("kaiming_u", &[20, 100], nn::init::DEFAULT_KAIMING_UNIFORM);
assert!(f64::abs(f64_from(&kaiming_u.mean(Kind::Float))) < 5e-3);
Expand Down

0 comments on commit 40ec5f7

Please sign in to comment.