docs: @Override
      public InputPreProcessor getInputPreprocessor(InputType... inputType) throws
              InvalidKerasConfigurationException {
          if (inputType.length > 1)
              throw new InvalidKerasConfigurationException(
                      "Keras Permute layer accepts only one input (received " + inputType.length + ")");
          InputPreProcessor preprocessor = null;
          if (inputType[0] instanceof InputType.InputTypeConvolutional) {
              switch (this.getDimOrder()) {
                  case THEANO:
                      preprocessor = new PermutePreprocessor(permutationIndices);
                      break;
                  case NONE: // TF by default
                  case TENSORFLOW:
                      // account for channels last
                      permutationIndices = new int[] {permutationIndices[2], permutationIndices[0], permutationIndices[1]};
                      preprocessor = new PermutePreprocessor(new int[]{1, 3, 2});
              }
          } else if (inputType[0] instanceof InputType.InputTypeRecurrent) {
              if (Arrays.equals(permutationIndices, new int[] {2, 1}))
                  preprocessor = new PermutePreprocessor(permutationIndices);
              else
                  throw new InvalidKerasConfigurationException("For RNN type input data, permutation dims have to be" +
                          "(2, 1) in Permute layer, got " + Arrays.toString(permutationIndices));
          } else if (inputType[0] instanceof InputType.InputTypeFeedForward) {
              preprocessor = null;
          } else {
              throw new InvalidKerasConfigurationException("Input type not supported: " + inputType[0]);
          }
          return preprocessor;
      }