Skip to content

Commit 0c9f9e9

Browse files
committed
fix test
Don't require TF tensor reduce generics in tests, so we can use r-pkg tensorflow 2.8.
1 parent 5e4f8dd commit 0c9f9e9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/testthat/test-layers-normalization.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ if(tf_version() >= "2.9")
1515
test_succeeds("layer unit normalization", {
1616
data <- as_tensor(1:6, shape = c(2, 3), dtype = "float64")
1717
normalized_data <- data %>%
18-
layer_unit_normalization(dtype = "float64")
18+
layer_unit_normalization(dtype = "float64") %>%
19+
as.array()
1920

2021
for (row in 1:2)
21-
expect_equal(as.array(sum(normalized_data[row,] ^ 2)), 1)
22+
expect_equal(sum(normalized_data[row,] ^ 2), 1)
2223
})

0 commit comments

Comments
 (0)