I tried to replace a graph.pb file in the exampe of https://codelabs.developers.google.com/codelabs/tensorflow-for-poets-2 But it failed to launch in Andriod with the error:
Not a valid TensorFlow Graph serialization: NodeDef mentions attr 'dilations' not in Op name=Conv2D.
12-16 15:06:24.986 4310-4310/org.tensorflow.demo E/AndroidRuntime: Caused by: java.io.IOException: Not a valid TensorFlow Graph serialization: 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: conv0/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true](truediv, conv0/W). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
at org.tensorflow.contrib.android.TensorFlowInferenceInterface.loadGraph(TensorFlowInferenceInterface.java:392)
How to generate the inference pb file with the right Conv2D graphDef?