Reconstructs the CNN1D Keras model from the saved weights and metadata
and returns a swrc_fit-compatible list that can be passed to
predict_swrc(), predict_swrc_dense(), etc.
Examples
if (FALSE) { # \dontrun{
if (reticulate::py_module_available("tensorflow")) {
df <- prepare_swrc_data(swrc_example, depth_col = "depth")
fit <- fit_swrc(df,
x_inputs = c("clay", "silt", "bd_gcm3", "soc", "Depth_num"),
epochs = 2L, verbose = FALSE)
save_swrc_model(fit, dir = tempdir(), name = "model_test")
fit2 <- load_swrc_model(tempdir(), "model_test")
}
} # }
