提交 c0d16f44 编写于 作者: L liuqi

Change the default input shape of tf_converter.

上级 abef71cf
......@@ -34,7 +34,9 @@ def main(unused_args):
output_graph_def = tf_dsp_converter_lib.convert_to_mace_pb(
input_graph_def, FLAGS.input_node, FLAGS.output_node, FLAGS.dsp_mode)
else:
input_shape = [int(x) for x in FLAGS.input_shape.split(',')]
input_shape = []
if FLAGS.input_shape != "":
input_shape.extend([int(x) for x in FLAGS.input_shape.split(',')])
output_graph_def = tf_converter_lib.convert_to_mace_pb(
input_graph_def, FLAGS.input_node, input_shape, FLAGS.output_node,
FLAGS.data_type, FLAGS.runtime, FLAGS.winograd)
......@@ -129,7 +131,7 @@ def parse_args():
parser.add_argument(
"--input_shape",
type=str,
default="1,512,512,3",
default="",
help="input shape.")
return parser.parse_known_args()
......
......@@ -4,10 +4,8 @@ import numpy as np
import math
import copy
from lib.python.tools import memory_optimizer
from tensorflow.core.framework import attr_value_pb2
from tensorflow.core.framework import graph_pb2
from tensorflow.core.framework import tensor_shape_pb2
from tensorflow.core.framework import node_def_pb2
# TODO: support NCHW formt, now only support NHWC.
padding_mode = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册