class_docstr: Single transformer encoder block (MHSA + MLP).
class_docstr_tok: ["Single","transformer","encoder","block","(","MHSA","+","MLP",")","."]
code: def __call__(self, x, deterministic=True):
      out = {}
      y = nn.LayerNorm()(x)
      y = out["sa"] = nn.MultiHeadDotProductAttention(
          num_heads=self.num_heads,
          kernel_init=nn.initializers.xavier_uniform(),
          deterministic=deterministic,
          dtype=self.dtype,
      )(y, y)
      y = nn.Dropout(rate=self.dropout)(y, deterministic)
      x = out["+sa"] = x + y
  
      y = nn.LayerNorm()(x)
      y = out["mlp"] = MlpBlock(
          mlp_dim=self.mlp_dim, dropout=self.dropout, dtype=self.dtype
      )(y, deterministic)
      y = nn.Dropout(rate=self.dropout)(y, deterministic)
      x = out["+mlp"] = x + y
      return x, out
  
file_path: scenic/scenic/projects/knowledge_visual_language/models/vit.py
imports: from typing import Optional, Sequence, Union
  from big_vision.models import vit
  import flax.linen
  import jax
  import jax.numpy
label_desc: Use image node_id 1 for calling the Encoder1DBlock obj's underlying member method code with example usage: obj.__call__(x, deterministic) and returns: x,  out