Skip to main content
. 2020 Oct 12;20(20):5770. doi: 10.3390/s20205770
Algorithm 1 pseudocode for the proposed algorithm
1. initialize network
2. reset : inputs = 0, Activations = 0
     forward propagation:
3. initialize the inputs do
4. roll over: Activations; cell states
5. loop over a cell, end for
6. do
  for t=0 to n do
    Calculates the gate values :
        inputs gates: it←σwxixt+whihft−1hft−2+wcict−1+bi
        forget gates: ft←σwxfxt+whfhft−1hft−2+wcfct−1+bf
        loop over the cells is block now
        output gates: ot←σwxoxt+whohft−1hft−2+wcoct−1+bo
        update the cell:ct←ftct−1+ittanhfwxcxt+whchft−1hft−2+bc
          final hidden state/ final output : hft←ot⊙tanhfct
   end for
7. Single activity detect
8.  do
  Update the weight
  end for
9. backward propagation do
     for t=0 to n
     inputs gates: δit←σwyixt+whihbt+1hbt+2+wcict+1+bi
    forget gates: δft←σwyfxt+whfhbt+1hbt+2+wcfct+1+bf
    output gates: δot←σwyoxt+whohbt+1hbt+2+wcoct+1+bo
    cell output: δct←ftδct+1+δittanhbwycxt+whchbt+1hbt+2+bc
10. Hidden state / final output : hbt←δot⊙tanhbδct
  end for
11. do
    z = hft tends to 1 and hbt tends to 1
    Concurrent activity detect
  end For
12. do for t=0 to n, k = 0 to n-1 do
Φ(zt,zt−1,y,t)=exp∑kλkfk(zt,zt−1,y,t),Ψ(zu,zv,y,u,v)=exp∑kλk′fk′(zu,zv,y,u,v)
                  ∂Pz|y∂λk=∂L∂λk=λkσ2
        end for
13. Interleaved activity detect
14. end for
15. end for
16. end