diff --git a/R/history.R b/R/history.R index 6bfa25dc6..e03241359 100644 --- a/R/history.R +++ b/R/history.R @@ -113,7 +113,7 @@ plot.keras_training_history <- function(x, y, metrics = NULL, method = c("auto", environment(smooth_args$formula) <- baseenv() if (theme_bw) { - smooth_args$size <- 0.5 + smooth_args$linewidth <- 0.5 smooth_args$color <- "gray47" p <- p + ggplot2::theme_bw() + diff --git a/tests/testthat/test-history.R b/tests/testthat/test-history.R index ffc6f92c1..199127623 100644 --- a/tests/testthat/test-history.R +++ b/tests/testthat/test-history.R @@ -5,8 +5,8 @@ test_succeeds("as.data.frame works for history with early stopping", { early_stop <- callback_early_stopping(monitor = "loss", patience = 1) - model <- keras_model_sequential() %>% - layer_dense(1, input_shape = 1) + model <- keras_model_sequential(input_shape = 1) %>% + layer_dense(1) model %>% compile(loss = "mse", optimizer = "adam")