code: @Override
      public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException {
          if (inputType.length > 1 && inputType.length != 3)
              throw new InvalidKerasConfigurationException("Keras LSTM layer accepts only one single input" +
                              "or three (input to LSTM and two states tensors, but " +
                              "received " + inputType.length + ".");
          InputPreProcessor preProcessor = getInputPreprocessor(inputType);
          if (preProcessor != null) {
              if (returnSequences) {
                  return preProcessor.getOutputType(inputType[0]);
              } else {
                  return this.getLSTMLayer().getOutputType(-1, preProcessor.getOutputType(inputType[0]));
              }
          } else
              return this.getLSTMLayer().getOutputType(-1, inputType[0]);
  
      }
docs: Get layer output type.
  
  @param inputType Array of InputTypes
  @return output type as InputType
  @throws InvalidKerasConfigurationException Invalid Keras config