• netfs's avatar
    Add `--image_bytes_as_serving_input` flag to export SavedModel (#5393) · 295259c3
    netfs authored
    with serving signature that accepts JPEG image bytes instead
    of a fixed size [HxWxC] image tensor.
    
    Passing JPEG image bytes is easier for inference/serving use
    cases. The model internally resizes/crops the JPEG image to
    required [HxWxC] tensor before passing it on for actual model
    inference.
    
    This change aligns with Cloud TPU/ResNet-50 model that offers a
    similar interface (jpeg bytes) for inferencing here:
    
    https://github.com/tensorflow/tpu/tree/master/models/official/resnet
    
    NOTE: This flag is set to `True` by default for ImageNet, and is
    disallowed for CIFAR (as it does not apply to CIFAR).
    295259c3
resnet_run_loop.py 24.8 KB