Thank you very much for your research and this tool in general without it I wouldn't go anywhere with frozen_graph problem.
Please share your thoughts on problem of unconsistent function signatures when translating layers from TF>2 to TF 1.X.
I mean for example if we had tf.nn.Conv2d
which has explicit_padding
attribute on TF>2 and we want to deploy it on TF==1.12, we'll see an error:
Traceback (most recent call last):
File "/root/anaconda2/envs/tf1/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 418, in import_graph_def
graph._c_graph, serialized, options) # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'explicit_paddings' not in Op<name=Conv2D; signature=input:T, filter:T -> output:T; attr=T:type,allowed=[DT_HALF, DT_BFLOAT16,
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"]; attr=dilatio
ns:list(int),default=[1, 1, 1, 1]>; NodeDef: {{node import/spnas_net/features/init_block/conv1/conv/conv/Conv2D}} = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], explicit_paddings=[], padding="V
ALID", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true](import/spnas_net/features/init_block/conv1/conv/zero_padding2d/Pad, import/spnas_net/features/init_block/conv1/conv/conv/Conv2D/ReadVariableOp). (Check whether
your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).