tensorflow-serving-example icon indicating copy to clipboard operation
tensorflow-serving-example copied to clipboard

Attempting to use uninitialized value when calling grpc_mnist_client.py

Open ChanningPing opened this issue 6 years ago • 0 comments

Thank you so much for sharing this example. I followed the tutorial step by step and got this error when running the following:

TENSORFLOW_SERVER_HOST="0.0.0.0"
python python/grpc_mnist_client.py \
  --image ./data/0.png \
  --model mnist \
  --host $TENSORFLOW_SERVER_HOST

The error message is as follows:

Traceback (most recent call last):
  File "python/grpc_mnist_client.py", line 56, in <module>
    run(args.host, args.port, args.image, args.model, args.signature_name)
  File "python/grpc_mnist_client.py", line 34, in run
    result = stub.Predict(request, 10.0)
  File "/home/qping/miniconda3/envs/tensorflow-serving-example/lib/python2.7/site-packages/grpc/beta/_client_adaptations.py", line 309, in __call__
    self._request_serializer, self._response_deserializer)
  File "/home/qping/miniconda3/envs/tensorflow-serving-example/lib/python2.7/site-packages/grpc/beta/_client_adaptations.py", line 195, in _blocking_unary_unary
    raise _abortion_error(rpc_error_call)
grpc.framework.interfaces.face.face.AbortionError: AbortionError(code=StatusCode.FAILED_PRECONDITION, details="Attempting to use uninitialized value conv2d/bias
	 [[Node: conv2d/bias/read = Identity[T=DT_FLOAT, _output_shapes=[[32]], _device="/job:localhost/replica:0/task:0/device:CPU:0"](conv2d/bias)]]")

I have trained 10 steps, and copied the saved_model.pb into the models_for_serving/mnist_custom_estimator/1 path for serving. Could you help to shed some light on why this happens, or where could i have missed? Thank you so much for your help!

ChanningPing avatar Sep 05 '18 01:09 ChanningPing