code: def encode(self, input_str):
      
      inputs = self.encoders["inputs"].encode(input_str) + [EOS_ID]
      batch_inputs = np.reshape(inputs, [1, -1, 1, 1])  # Make it 3D.
      return batch_inputs
docs: Input str to features dict, ready for inference.