Skip to main content
. 2023 Sep 11;23(18):7793. doi: 10.3390/s23187793
Algorithm 2 Internal performance of Bi-LSTM model
  • 1: Start

  • 2: The forget gate operation [43]: fgt = fψ(QfgXt+TfgPt1+bfg)

  • 3: The input gate operation: igt = fψ(QigXt+TigPt1+big)

  • 4: The candidate gate operation [43]: cnt = ftanh(QcnXt+TcnPt1+bcn)

  • 5: The output gate operation: ogt = fψ(QogXt+TogPt1+bog)

  • 6: Updating the prior cell state, Ct1 to the present cell state: udt = (Ct1fgt)+(igtcnt)

  • 7: At time step t, the hidden state: Pt=ogtftanh(udt)

  • 8: The Bi-LSTM layer’s output hidden state: HIt=f(QHITTt+QHITTt+bz)

  • 9: Stop