Skip to main content
. 2022 Apr 6;9(4):161. doi: 10.3390/bioengineering9040161
Algorithm 1: Discriminative fine-tuning algorithm.
1: Procedure DFT
2:    Input: (αmin: minimum learning rate,
αmax: maximum learning rate,
mmin: minimum momentum,
mmax: maximum momentum,
D: size of dataset,
batch_size)
3:    Output: (θ: Network parameters)
4:    t Dbatch_size
5:     κrand(0,1)  //κ    //κ determines how rapidly the learning rate increase or reduces
    while κt<12tmax
6:    for t in each iteration do:
7:    for l in each layer do:
8:    αtlαmin+(αmaxαminαmax)l     //increase learning rate per layer
9:    mtlmmin+(mmaxmminmmax)l   //increasing the momentum per layer
10:     𝓋t+1lmtl𝓋 tlαtldJ(θtl)dθtl
11:    θt+1lθtl+ t+1l             //update the layer parameters
12:    end for
13.    end for
14.    end while
15.    while 12tκt<tmax
16.    for t in each iteration do:
17.    for l in each layer do:
18.    αtlαmin(αmaxαminαmax)l    //increase learning rate per layer
19.    mtlmmin(mmaxmminmmax)l    //increasing the momentum per layer
20.     𝓋t+1lmtl𝓋 tlαtldJ(θtl)dθtl
21.    θt+1lθtl+ t+1l          //update the layer parameters
22.    end for
23.    end for
24.    end while
25. end Procedure