getKerasConf | R Documentation |
Configuration list for keras
's fit
function.
getKerasConf()
Additional parameters passed to keras
, e.g.,
activation:
character. Activation function in the last layer. Default: "sigmoid"
.
active:
vector of active varaibles, e.g., c(1,10) specifies that the first and tenth variable will be considerer by spot.
callbacks:
List of callbacks to be called during training. Default: list()
.
clearSession:
logical. Whether to call k_clear_session
or not at the end of keras modelling. Default: FALSE
.
encoding:
character. Encoding used during data preparation, e.g., by getMnistData
. Default: "oneHot"
.
loss:
character. Loss function for compile. Default: "loss_binary_crossentropy"
.
metrics:
character. Metrics function for compile. Default: "binary_accuracy"
.
model:
model specified via getModelConf
. Default: "dl"
.
nClasses:
Number of classes in (multi-class) classification. Specifies the number of units in the last layer (before softmax).
Default: 1
(binary classification).
resDummy:
logical. If TRUE
, generate dummy (mock up) result for testing. If FALSE
, run keras and tf evaluations.
Default: FALSE
.
returnValue:
Return value. Can be one of "trainingLoss"
, "negTrainingAccuracy"
,
"validationLoss"
, "negValidationAccuracy"
, "testLoss"
, or "negTestAccuracy"
.
returnObject:
Return object. Can be one of "evaluation"
, "model"
,
"pred"
. Default: "evaluation"
.
shuffle:
Logical (whether to shuffle the training data before each epoch) or string (for "batch").
"batch" is a special option for dealing with the limitations of HDF5 data; it shuffles in batch-sized chunks.
Has no effect when steps_per_epoch is not NULL. Default: FALSE
.
testData:
Test Data on which to evaluate the loss and any model metrics at the end of the optimization using evaluate().
tfDevice:
Tensorflow device. CPU/GPU allocation. Passed to tensorflow
via tf$device(kerasConf$tfDevice)
. Default: "/cpu:0"
(use CPU only).
trainData:
Train Data on which to evaluate the loss and any model metrics at the end of each epoch.
validationData:
Validation Data on which to evaluate the loss and any model metrics at the end of each epoch.
validation_data (deprecated, see validationData):
Data on which to evaluate the loss and any model metrics at the end of each epoch.
The model will not be trained on this data. This could be a list (x_val, y_val) or a list (x_val, y_val, val_sample_weights).
validation_data will override validation_split. Default: NULL
.
validation_split:
Float between 0 and 1. Fraction of the training data to be
used as validation data. The model will set apart this fraction of the training data,
will not train on it, and will evaluate the loss and any model metrics on this data at the end of each epoch.
The validation data is selected from the last samples in the x and y data provided, before shuffling. Default: 0.2
.
verbose:
Verbosity mode (0 = silent, 1 = progress bar, 2 = one line per epoch). Default: 0
.
kerasConf list
with configuration parameters.
evalKerasMnist
funKerasMnist
fit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.