Research Article
Deep Convolutional Neural Networks for Hyperspectral Image Classification
Constructing the CNN Model | function INITCNNMODEL (, []) | layerType = convolution, max-pooling, fully-connected, fully-connected; | layerActivation = , , , | model = new Model(); | for to do | layer = new Layer(); | layer.type = layerType; | layer.inputSize = | layer.neurons = new Neuron ; | layer.params = ; | model.addLayer(layer); | end for | return model; | end function | Training the CNN Model | Initialize learning rate , number of max iteration , min error , training | batchs , bach size , and so on; | Compute , , , , , according to and ; | Generate random weights of the CNN; | cnnModel = InitCNNModel(, []); | iter = 0; err = +; | while err and iter do | err = ; | for bach to do | = cnnModel.train (TrainingDatas, TrainingLabels), as (4) and (8); | Update using (7); | err = err + mean(); | end for | err = err/; | iter++; | end while | Save parameters of the CNN; |
|