Skip to content

Commit

Permalink
Change assert_approx_eq precision from 3 to 2 (#1491)
Browse files Browse the repository at this point in the history
  • Loading branch information
laggui authored Mar 19, 2024
1 parent 69f1877 commit 430f642
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/burn-jit/src/tests/reduce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ mod reduction {
));
let val_ref = tensor_ref.sum_dim(reduce_dim);

val_ref.into_data().assert_approx_eq(&val.into_data(), 3);
val_ref.into_data().assert_approx_eq(&val.into_data(), 2);
}

#[test]
Expand All @@ -142,7 +142,7 @@ mod reduction {
));
let val_ref = tensor_ref.sum_dim(reduce_dim);

val_ref.into_data().assert_approx_eq(&val.into_data(), 3);
val_ref.into_data().assert_approx_eq(&val.into_data(), 2);
}

#[test]
Expand All @@ -160,7 +160,7 @@ mod reduction {
));
let val_ref = tensor_ref.sum_dim(reduce_dim);

val_ref.into_data().assert_approx_eq(&val.into_data(), 3);
val_ref.into_data().assert_approx_eq(&val.into_data(), 2);
}

#[test]
Expand All @@ -181,7 +181,7 @@ mod reduction {
));
let val_ref = tensor_ref.sum_dim(reduce_dim);

val_ref.into_data().assert_approx_eq(&val.into_data(), 3);
val_ref.into_data().assert_approx_eq(&val.into_data(), 2);
}

#[test]
Expand All @@ -199,7 +199,7 @@ mod reduction {
));
let val_ref = tensor_ref.mean_dim(reduce_dim);

val_ref.into_data().assert_approx_eq(&val.into_data(), 3);
val_ref.into_data().assert_approx_eq(&val.into_data(), 2);
}

#[test]
Expand Down Expand Up @@ -254,7 +254,7 @@ mod reduction {
));
let val_ref = tensor_ref.sum();

val_ref.into_data().assert_approx_eq(&val.into_data(), 3);
val_ref.into_data().assert_approx_eq(&val.into_data(), 2);
}

#[test]
Expand All @@ -270,7 +270,7 @@ mod reduction {
));
let val_ref = tensor_ref.prod();

val_ref.into_data().assert_approx_eq(&val.into_data(), 3);
val_ref.into_data().assert_approx_eq(&val.into_data(), 2);
}

#[test]
Expand Down

0 comments on commit 430f642

Please sign in to comment.