Skip to content

Commit

Permalink
add transformer test
Browse files Browse the repository at this point in the history
  • Loading branch information
egillax committed Sep 7, 2023
1 parent 5540e7d commit 66cfbb4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/testthat/test-Transformer.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ test_that("dimHidden ratio works as expected", {
randomSample = randomSample)
dimHidden <- unlist(lapply(modelSettings$param, function(x) x$dimHidden))
tokens <- unlist(lapply(modelSettings$param, function(x) x$dimToken))
expect_true(all(dimHidden == dimHiddenRatio * tokens))
testthat::expect_true(all(dimHidden == dimHiddenRatio * tokens))
testthat::expect_error(setTransformer(dimHidden = NULL,
dimHiddenRatio = NULL))
testthat::expect_error(setTransformer(dimHidden = 256,
dimHiddenRatio = 4/3))

})

0 comments on commit 66cfbb4

Please sign in to comment.