Skip to content

Commit 44a08b7

Browse files
committed
toggle mlp activation by engine
1 parent 1597a76 commit 44a08b7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

R/tunable.R

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,18 @@ tunable.mlp <- function(x, ...) {
355355
list(list(pkg = "dials", fun = "learn_rate", range = c(-3, -1/2)))
356356
res$call_info[res$name == "epochs"] <-
357357
list(list(pkg = "dials", fun = "epochs", range = c(5L, 500L)))
358+
activation_values <- rlang::eval_tidy(
359+
rlang::call2("brulee_activations", .ns = "brulee")
360+
)
361+
res$call_info[res$name == "activation"] <-
362+
list(list(pkg = "dials", fun = "activation", values = activation_values))
363+
} else if (x$engine == "keras") {
364+
activation_values <- parsnip::keras_activations()
365+
res$call_info[res$name == "activation"] <-
366+
list(list(pkg = "dials", fun = "activation", values = activation_values))
358367
}
359368
res
360-
}
369+
}
361370

362371
#' @export
363372
tunable.survival_reg <- function(x, ...) {

0 commit comments

Comments
 (0)