docstr: :param inputs: The input vector fed into the encoder.
         Shape: [batch x H3_INPUT_SIZE], type torch.int8
  :type inputs: Tensor
docstr_tok: [":","param","inputs",":","The","input","vector","fed","into","the","encoder",".","Shape",":","[","batch","x","H3_INPUT_SIZE","]",",","type","torch.int8",":","type","inputs",":","Tensor"]
code: def forward(self, inputs: torch.Tensor) -> EncoderOutputDict:
      """
      :param inputs: The input vector fed into the encoder.
             Shape: [batch x H3_INPUT_SIZE], type torch.int8
      :type inputs: Tensor
      """
  
      # ================ Embeddings ================
      embedded_h3 = self.h3_embed(inputs)
  
      # ================ RNN ================
      hidden, final_state = self.recurrent_stack(
          embedded_h3[ENCODER_OUTPUT]
      )
  
      return {ENCODER_OUTPUT: hidden, ENCODER_OUTPUT_STATE: final_state}
  
imports: import logging
  from typing import Dict, List, Optional, Type
  import torch
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import ENCODER_OUTPUT, ENCODER_OUTPUT_STATE, H3
  from ludwig.encoders.base import Encoder
  from ludwig.encoders.registry import register_encoder
  from ludwig.encoders.types import EncoderOutputDict
  from ludwig.modules.embedding_modules import Embed, EmbedSequence
  from ludwig.modules.fully_connected_modules import FCStack
  from ludwig.modules.initializer_modules import get_initializer
  from ludwig.modules.recurrent_modules import RecurrentStack
  from ludwig.modules.reduction_modules import SequenceReducer
  from ludwig.schema.encoders.base import BaseEncoderConfig
  from ludwig.schema.encoders.h3_encoders import H3EmbedConfig, H3RNNConfig, H3WeightedSumConfig
  from ludwig.utils import torch_utils
label_desc: Use image node_id 2 for calling the H3RNN obj's underlying member method code with example usage: obj.forward(inputs) and returns: dict