class_docstr: Transformer Encoder Block
class_docstr_tok: ["Transformer","Encoder","Block"]
code: def call(
      self,
      x: tf.Tensor,
      mask: Optional[tf.Tensor] = None,
      **kwargs: Any,
  ) -> tf.Tensor:
      output = x
  
      for i in range(self.num_layers):
          normed_output = self.layer_norm_input(output, **kwargs)
          output = output + self.dropout(
              self.attention[i](
                  normed_output,
                  normed_output,
                  normed_output,
                  mask,
                  **kwargs,
              ),
              **kwargs,
          )
          normed_output = self.layer_norm_attention(output, **kwargs)
          output = output + self.dropout(
              self.position_feed_forward[i](normed_output, **kwargs),
              **kwargs,
          )
  
      # (batch_size, seq_len, d_model)
      return self.layer_norm_output(output, **kwargs)
  
imports: import math
  from typing import Any, Callable, Optional, Tuple
  import tensorflow
  from tensorflow.keras import layers
  from doctr.utils.repr import NestedObject
label_desc: Use image node_id 2 for calling the EncoderBlock obj's underlying member method code with example usage: obj.call(x, mask) and returns: self