Issue
I've built TensorFlow C++ for Windows using CMake and can run a few examples. But, when trying to perform a prediction on my model, I get the following error message:
Executor failed to create kernel. Invalid argument: NodeDef mentions attr 'dilations' not in Op
and
Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.
I've trained my model using Keras and tf 1.5. The model uses adam as an optimizer and is a simple ResNet50-based model. I converted the Keras model to TensorFlow using this script, and it runs OK on TensorFlow for Python.
Any ideas?
Here's the full log:
2018-02-23 08:32:39.588610: E C:\Visual Studio 2015\Projects\tensorflow\tensorflow\core\common_runtime\executor.cc:643] Executor failed to create kernel. Invalid argument: NodeDef mentions attr 'dilations' not in Op<name=Conv2D; signature=input:T, filter:T -> 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: conv1/convolution = 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/cpu:0"](zeropadding2d_1/Pad, conv1/kernel). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
[[Node: conv1/convolution = 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/cpu:0"](zeropadding2d_1/Pad, conv1/kernel)]]
2018-02-23 08:32:39.637876: E matmul.cpp:357] Running model failed: Invalid argument: NodeDef mentions attr 'dilations' not in Op<name=Conv2D; signature=input:T, filter:T -> 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: conv1/convolution = 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/cpu:0"](zeropadding2d_1/Pad, conv1/kernel). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
[[Node: conv1/convolution = 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/cpu:0"](zeropadding2d_1/Pad, conv1/kernel)]]
I'm using Windows 10 x64 with TensorFlow built with CMake and Visual Studio 2015.
Thanks!
Solution
The solution was updating TensorFlow to a newer version. The version I was used did not supported some operations implemented in Keras.
Answered By - Willams Costa
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.