Commit f2bc366e authored by Fan Yang's avatar Fan Yang Committed by A. Unique TensorFlower
Browse files

Internal change.

PiperOrigin-RevId: 406431760
parent d4176a95
...@@ -43,8 +43,11 @@ def create_classification_export_module(params: cfg.ExperimentConfig, ...@@ -43,8 +43,11 @@ def create_classification_export_module(params: cfg.ExperimentConfig,
l2_regularizer=None) l2_regularizer=None)
def preprocess_fn(inputs): def preprocess_fn(inputs):
image_tensor = export_utils.parse_image( image_tensor = export_utils.parse_image(inputs, input_type,
inputs, input_type, input_image_size, num_channels) input_image_size, num_channels)
# If input_type is `tflite`, do not apply image preprocessing.
if input_type == 'tflite':
return image_tensor
def preprocess_image_fn(inputs): def preprocess_image_fn(inputs):
return classification_input.Parser.inference_fn( return classification_input.Parser.inference_fn(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment