0
votes

I created a saved model from the pre-trained resnet50 model for serving using the tensorflow serving module. But when I try to run the model server i get this error:

2018-03-23 13:36:37.130839: E external/org_tensorflow/tensorflow/core/common_runtime/executor.cc:651] Executor failed to create kernel. Invalid argument: NodeDef mentions attr 'dilations' not in Op output:T; attr=T:type,allowed=[DT_HALF, DT_FLOAT]; attr=strides:list(int); attr=use_cudnn_on_gpu:bool,default=true; attr=padding:string,allowed=["SAME", "VALID"]; attr=data_format:string,default="NHWC",allowed=["NHWC", "NCHW"]>; NodeDef: FirstStageFeatureExtractor/resnet_v1_50/resnet_v1_50/conv1/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="VALID", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](FirstStageFeatureExtractor/resnet_v1_50/resnet_v1_50/Pad, FirstStageFeatureExtractor/resnet_v1_50/conv1/weights/read). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). [[Node: FirstStageFeatureExtractor/resnet_v1_50/resnet_v1_50/conv1/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="VALID", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](FirstStageFeatureExtractor/resnet_v1_50/resnet_v1_50/Pad, FirstStageFeatureExtractor/resnet_v1_50/conv1/weights/read)]]

1

1 Answers

0
votes

Well, it tells you whats wrong though it may be hard to see under all the details:

"Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary"

You seem to be using a very recent version of TensorFlow which has added a "dilations" parameter to Conv2D.

The TensorFlow version in the tensorflow_model_server is simply older than that and hence does not know how to instantiate that operator.

Either try rebuild your model on a sufficiently older TensorFlow release or try creating a tensorflow_model_server with a newer TensorFlow version.

In the current TensorFlow Serving pool this can be easily done with

bazel build --action_env TF_REVISION="{git hash}" //tensorflow_serving/model_servers:tensorflow_model_server

For details, see https://github.com/tensorflow/serving/commit/f9e602c753ef82ff96b28429dd07e900f10eb007