code: def forward(self, prev_hidden, batch_H, char_onehots):
      # [batch_size x num_encoder_step x num_channel] -> [batch_size x num_encoder_step x hidden_size]
      batch_H_proj = self.i2h(batch_H)
      prev_hidden_proj = self.h2h(prev_hidden[0]).unsqueeze(1)
      e = self.score(
          torch.tanh(batch_H_proj + prev_hidden_proj)
      )  # batch_size x num_encoder_step * 1
  
      alpha = F.softmax(e, dim=1)
      context = torch.bmm(alpha.permute(0, 2, 1), batch_H).squeeze(
          1
      )  # batch_size x num_channel
      concat_context = torch.cat(
          [context, char_onehots], 1
      )  # batch_size x (num_channel + num_embedding)
      cur_hidden = self.rnn(concat_context, prev_hidden)
      return cur_hidden, alpha
  
file_path: EasyOCR/trainer/modules/prediction.py
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 2 for calling the AttentionCell obj's underlying member method code with example usage: obj.forward(prev_hidden, batch_H, char_onehots) and returns: cur_hidden,  alpha