class_docstr: One TransformerEncoder consists of several TransformerLayers.
  
  - n_layers(num): num of transformer layers in transformer encoder. Default: 2
  - n_heads(num): num of attention heads for multi-head attention layer. Default: 2
  - hidden_size(num): the input and output hidden size. Default: 64
  - inner_size(num): the dimensionality in feed-forward layer. Default: 256
  - hidden_dropout_prob(float): probability of an element to be zeroed. Default: 0.5
  - attn_dropout_prob(float): probability of an attention score to be zeroed. Default: 0.5
  - hidden_act(str): activation function in feed-forward layer. Default: 'gelu'
                candidates: 'gelu', 'relu', 'swish', 'tanh', 'sigmoid'
  - layer_norm_eps(float): a value added to the denominator for numerical stability. Default: 1e-12
class_docstr_tok: ["One","TransformerEncoder","consists","of","several","TransformerLayers",".","-","n_layers","(","num",")",":","num","of","transformer","layers","in","transformer","encoder",".","Default",":","2","-","n_heads","(","num",")",":","num","of","attention","heads","for","multi-head","attention","layer",".","Default",":","2","-","hidden_size","(","num",")",":","the","input","and","output","hidden","size",".","Default",":","64","-","inner_size","(","num",")",":","the","dimensionality","in","feed-forward","layer",".","Default",":","256","-","hidden_dropout_prob","(","float",")",":","probability","of","an","element","to","be","zeroed",".","Default",":","0.5","-","attn_dropout_prob","(","float",")",":","probability","of","an","attention","score","to","be","zeroed",".","Default",":","0.5","-","hidden_act","(","str",")",":","activation","function","in","feed-forward","layer",".","Default",":","'gelu'","candidates",":","'gelu","'",",","'relu","'",",","'swish","'",",","'tanh","'",",","'sigmoid'","-","layer_norm_eps","(","float",")",":","a","value","added","to","the","denominator","for","numerical","stability",".","Default",":","1e-12"]
code: def __init__(
      self,
      n_layers=2,
      n_heads=2,
      hidden_size=64,
      inner_size=256,
      hidden_dropout_prob=0.5,
      attn_dropout_prob=0.5,
      hidden_act="gelu",
      layer_norm_eps=1e-12,
      config=None,
  ):
      super(FEAEncoder, self).__init__()
      self.n_layers = n_layers
      self.layer = nn.ModuleList()
      for n in range(self.n_layers):
          self.layer_ramp = FEABlock(
              n_heads,
              hidden_size,
              inner_size,
              hidden_dropout_prob,
              attn_dropout_prob,
              hidden_act,
              layer_norm_eps,
              n,
              config,
          )
          self.layer.append(self.layer_ramp)
  
imports: import random
  import numpy
  import torch
  from torch import nn
  import torch.nn.functional
  import math
  import torch.nn.functional
  from recbole.model.abstract_recommender import SequentialRecommender
  from recbole.model.loss import BPRLoss
  from recbole.data.interaction import Interaction
label_desc: Use image node_id 1 to create a new FEAEncoder object from inherited base classes: nn with example: obj = FEAEncoder(n_layers, n_heads, hidden_size, inner_size, hidden_dropout_prob, attn_dropout_prob, hidden_act, layer_norm_eps, config)