提交 d75d2464 编写于 作者: L Liufang Sang 提交者: whs

update data layer test=release/1.6 (#3640)

上级 2785c5d3
...@@ -44,8 +44,8 @@ def compress(args): ...@@ -44,8 +44,8 @@ def compress(args):
assert args.model in model_list, "{} is not in lists: {}".format(args.model, assert args.model in model_list, "{} is not in lists: {}".format(args.model,
model_list) model_list)
image = fluid.layers.data(name='image', shape=image_shape, dtype='float32') image = fluid.data(name='image', shape=[None] + image_shape, dtype='float32')
label = fluid.layers.data(name='label', shape=[1], dtype='int64') label = fluid.data(name='label', shape=[None, 1], dtype='int64')
# model definition # model definition
model = models.__dict__[args.model]() model = models.__dict__[args.model]()
......
...@@ -72,8 +72,8 @@ def compress(args): ...@@ -72,8 +72,8 @@ def compress(args):
image_shape="3,224,224" image_shape="3,224,224"
image_shape = [int(m) for m in image_shape.split(",")] image_shape = [int(m) for m in image_shape.split(",")]
assert args.model in model_list, "{} is not in lists: {}".format(args.model, model_list) assert args.model in model_list, "{} is not in lists: {}".format(args.model, model_list)
image = fluid.layers.data(name='image', shape=image_shape, dtype='float32') image = fluid.data(name='image', shape=[None] + image_shape, dtype='float32')
label = fluid.layers.data(name='label', shape=[1], dtype='int64') label = fluid.data(name='label', shape=[None, 1], dtype='int64')
# model definition # model definition
model = models.__dict__[args.model]() model = models.__dict__[args.model]()
out = model.net(input=image, class_dim=class_dim) out = model.net(input=image, class_dim=class_dim)
......
...@@ -38,8 +38,8 @@ def compress(args): ...@@ -38,8 +38,8 @@ def compress(args):
image_shape = "3,224,224" image_shape = "3,224,224"
image_shape = [int(m) for m in image_shape.split(",")] image_shape = [int(m) for m in image_shape.split(",")]
image = fluid.layers.data(name='image', shape=image_shape, dtype='float32') image = fluid.data(name='image', shape=[None] + image_shape, dtype='float32')
label = fluid.layers.data(name='label', shape=[1], dtype='int64') label = fluid.data(name='label', shape=[None, 1], dtype='int64')
# model definition # model definition
model = models.__dict__[args.model]() model = models.__dict__[args.model]()
......
...@@ -43,8 +43,8 @@ def compress(args): ...@@ -43,8 +43,8 @@ def compress(args):
assert args.model in model_list, "{} is not in lists: {}".format(args.model, assert args.model in model_list, "{} is not in lists: {}".format(args.model,
model_list) model_list)
image = fluid.layers.data(name='image', shape=image_shape, dtype='float32') image = fluid.data(name='image', shape=[None] + image_shape, dtype='float32')
label = fluid.layers.data(name='label', shape=[1], dtype='int64') label = fluid.data(name='label', shape=[None, 1], dtype='int64')
# model definition # model definition
model = models.__dict__[args.model]() model = models.__dict__[args.model]()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册