runCLR: Optimizes the cyclical learning rate (CLR) based...

Description Usage Arguments Examples

View source: R/cleavageModelAndPrediction.R

Description

The function optimizes the cyclical learning rate (CLR) based convolutional neural network (CNN) model based on the hyperparameters assigned

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
runCLR(
  optimizer2 = keras::optimizer_sgd(lr = lr_max1, decay = 0),
  denseLoop2,
  trainLabels2 = trainLabels,
  epochs2 = 5,
  batch_size2,
  dropout2 = 0.2,
  patience2 = 30,
  validation_split2 = 0.2,
  convolutionalLoop2,
  NO_pooling2 = 1,
  testPics2 = testPics,
  Learning_rate_l2 = Learning_rate_l,
  Learning_rate_h2 = Learning_rate_h,
  pathOut = paste0(homePath1, "/bayesmodels/")
)

Arguments

optimizer2

Optimizer

denseLoop2

Number of times to iterate the dense layers loops

trainLabels2

trainLabels object generated by

epochs2

Number of epochs in keras

batch_size2

Batch size in keras

dropout2

Keras dropout

patience2

EarlyStopping patience

validation_split2

Fraction of the dataset that will be used for validation

convolutionalLoop2

Number of times to iterate the convolutional layers loop

NO_pooling2

Number of times to perform pooling in the convolutional layers loop (max = 2)

testPics2

Image info object generated by kerasCreateDataset_2d

Learning_rate_l2

Minimum CLR assigned from tuneCLR

Learning_rate_h2

Maximum CLR assigned from tuneCLR

pathOut

path where the generated model(s) will be saved

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
runCLR(optimizer2 = optimizer_sgd(lr=lr_max, decay=0),
denseLoop2,
trainLabels2 = trainLabels,
epochs2 = 5,
batch_size2,
dropout2 = 0.2,
patience2 = 30,
validation_split2 = 0.2,
convolutionalLoop2 ,
NO_pooling2 = 1,
testPics2 = testPics,
Learning_rate_l2 = Learning_rate_l,
Learning_rate_h2 = Learning_rate_h,
pathOut = "keras/3categories/bayesmodels/"
)

kristianHoden/smartPARE documentation built on July 3, 2021, 7:10 p.m.