@Override public InputPreProcessor getPreProcessorForInputType(InputType inputType) { return layer.getPreProcessorForInputType(inputType); }
/** * Gets appropriate DL4J InputPreProcessor for given InputTypes. * * @param inputType Array of InputTypes * @return DL4J InputPreProcessor * @throws InvalidKerasConfigurationException * @see org.deeplearning4j.nn.conf.InputPreProcessor */ public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException { InputPreProcessor preprocessor = null; if (this.layer != null) { if (inputType.length > 1) throw new InvalidKerasConfigurationException( "Keras layer of type \"" + this.className + "\" accepts only one input"); preprocessor = this.layer.getPreProcessorForInputType(inputType[0]); } return preprocessor; }
InputPreProcessor preproc = l.getPreProcessorForInputType(layerInput); lv.setPreProcessor(preproc);
if (inputPreProcessors.get(i) == null) { InputPreProcessor inputPreProcessor = l.getPreProcessorForInputType(currentInputType); if (inputPreProcessor != null) { inputPreProcessors.put(i, inputPreProcessor);