View source: R/funKerasTransferLearning.R
evalKerasTransferLearning | R Documentation |
Hyperparameter Tuning: Keras TransferLearning Test Function.
evalKerasTransferLearning(x, kerasConf = getKerasConf(), data = NULL)
x |
matrix of hyperparameter values to evaluate with the function.
Rows for points and columns for dimension.
|
kerasConf |
List of additional parameters passed to keras as described in |
data |
data |
Trains a transfer learning model. Standard Code from https://tensorflow.rstudio.com/ Modified by T. Bartz-Beielstein (tbb@bartzundbartz.de)
list with function values (training, validation, and test loss/accuracy, and keras model information)
getKerasConf
funKerasTransferLearning
funKerasMnist
fit
### These examples require an activated Python environment as described in ### Bartz-Beielstein, T., Rehbach, F., Sen, A., and Zaefferer, M.: ### Surrogate Model Based Hyperparameter Tuning for Deep Learning with SPOT, ### June 2021. http://arxiv.org/abs/2105.14625. PYTHON_RETICULATE <- FALSE if(PYTHON_RETICULATE){ library("SPOTMisc") lower <- c(1e-6, 1e-6, 1, 0.6, 0.99, 1e-9, 1) x <- matrix(lower, 1,) res <- evalKerasTransferLearning(x, kerasConf = getKerasConf() ) str(res) ### The number of units for all layers can be listed as follows: res$modelConf$config$layers[,2]$units }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.