kerasCreateModelCNN_2d: Function used to create a 2d CNN model

Description Usage Arguments Examples

View source: R/cleavageModelAndPrediction.R

Description

The model is used to train a Convolutional neural network model that can recognize images

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
kerasCreateModelCNN_2d(
  denseLoop = 3,
  testPics,
  trainLabels,
  epochs,
  batch_size,
  dropout = 0.2,
  patience = 0,
  validation_split,
  activation = "relu",
  activationFinal = "softmax",
  pixels = 28,
  optimizer = "adam",
  convolutionalLoop = 2,
  NO_pooling = 1
)

Arguments

denseLoop

Number of times to iterate the dense layers loops

testPics

Image info object generated by kerasCreateDataset_2d

trainLabels

trainLabels object generated by

epochs

Number of epochs in keras

batch_size

Batch size in keras

dropout

Keras dropout

patience

EarlyStopping patience

validation_split

Fraction of the dataset that will be used for validation

activation

Standard function activation

activationFinal

Final activation function of the model

pixels

Pixel size of the images, assigned in kerasCreateDataset_2d

optimizer

Optimizer

convolutionalLoop

Number of times to iterate the convolutional layers loop

NO_pooling

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
kerasCreateModelCNN_2d(testPics,
trainLabels,
denseLoop = 3,
epochs,
batch_size,
dropout = 0.2,
patience = 0,
validation_split,
activation = "relu",
activationFinal = "softmax",
pixels =28,
optimizer = "adam",
convolutionalLoop = 2,
NO_pooling = 1
)

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