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
      """
      input_vector = inputs.int()
  
      # ================ Embeddings ================
      embedded_mode = self.embed_mode(input_vector[:, 0:1]).unsqueeze(1)
      embedded_edge = self.embed_edge(input_vector[:, 1:2]).unsqueeze(1)
      embedded_resolution = self.embed_resolution(
          input_vector[:, 2:3]
      ).unsqueeze(1)
      embedded_base_cell = self.embed_base_cell(
          input_vector[:, 3:4]
      ).unsqueeze(1)
      embedded_cells = self.embed_cells(input_vector[:, 4:])
  
      # ================ Masking ================
      # Mask out cells beyond the resolution of interest.
      resolution = input_vector[:, 2]
      mask = torch.unsqueeze(
          torch_utils.sequence_mask(resolution, 15), dim=-1
      ).float()
      # Batch size X 15(max resolution) X embedding size
      masked_embedded_cells = embedded_cells * mask
  
      # ================ Reduce ================
      # Batch size X H3_INPUT_SIZE X embedding size
      concatenated = torch.cat(
          [
              embedded_mode,
              embedded_edge,
              embedded_resolution,
              embedded_base_cell,
              masked_embedded_cells,
          ],
          dim=1,
      )
  
      hidden = self.reduce_sequence(concatenated)
  
      # ================ FC Stack ================
      # logger.debug('  flatten hidden: {0}'.format(hidden))
      hidden = self.fc_stack(hidden)
  
      return {ENCODER_OUTPUT: hidden}
  
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 H3Embed obj's underlying member method code with example usage: obj.forward(inputs) and returns: dict