container/sample-inf1/inf1_tf_handler.py [43:52]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    f = data.read()
    f = io.BytesIO(f)
    image = Image.open(f).convert('RGB')
    batch_size = 1
    image = np.asarray(image.resize((224, 224)))
    image = np.concatenate([image[np.newaxis, :, :]] * batch_size)
    request = predict_pb2.PredictRequest()
    request.model_spec.name = 'compiled_models'
    request.model_spec.signature_name = 'serving_default'
    request.inputs['Placeholder:0'].CopyFrom(tf.compat.v1.make_tensor_proto(image, shape=image.shape, dtype=tf.float32))
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



container/sample-inf1/inf1_tf_io_handler.py [30:39]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    f = data.read()
    f = io.BytesIO(f)
    image = Image.open(f).convert('RGB')
    batch_size = 1
    image = np.asarray(image.resize((224, 224)))
    image = np.concatenate([image[np.newaxis, :, :]] * batch_size)
    request = predict_pb2.PredictRequest()
    request.model_spec.name = 'compiled_models'
    request.model_spec.signature_name = 'serving_default'
    request.inputs['Placeholder:0'].CopyFrom(tf.compat.v1.make_tensor_proto(image, shape=image.shape, dtype=tf.float32))
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



