I am trying to build a new Tensorflow Inception v3 network to run on an iOS app.
This was working in the iOS app on iPhone through using the steps in the Tensorflow iOS demo.
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/ios
It was working with an old Inception image classifier (optimizedgraph.pb and labels.txt files)
I am trying to regenerate the network with new images. The new network runs fine on python, Android, but does not work on iOS.
The error is:
2018-05-10 14:49:42.485845: E tensorflow/core/common_runtime/executor.cc:644] Executor failed to create kernel. Invalid argument: NodeDef mentions attr 'dilations' not in Op output:T; attr=T:type,allowed=[DT_HALF, DT_FLOAT, DT_DOUBLE]; 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: conv/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/cpu:0"](_recv_Mul_0, conv/conv2d_params). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). [[Node: conv/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/cpu:0"](_recv_Mul_0, conv/conv2d_params)]]
Searching about this my only guess is it because the iOS Tensorflow support is based on an old version of Tensorflow, and graph files built using Tensorflow 1.8 will not work.
I tried downgrading to Tensorflow 1.7 on my build machine and regenerating the graph file, but the 1.7 graph file gives the same error on iOS.
Any ideas what version of Tensorflow iOS requires? or if iOS can be upgraded, or what this error is caused by?
This was solved by downgranding to Tensorflow 1.1 to build the graph.pb file. It seems the iOS demo/support requires Tensorflow 1.1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With