提交 ee697b8b 编写于 作者: Y Yu Yang

Larger model

上级 b94ffacb
...@@ -46,12 +46,14 @@ class ParallelExecutor(unittest.TestCase): ...@@ -46,12 +46,14 @@ class ParallelExecutor(unittest.TestCase):
lod_levels=[0, 0], lod_levels=[0, 0],
dtypes=['float32', 'int64']) dtypes=['float32', 'int64'])
img, label = fluid.layers.read_file(reader) img, label = fluid.layers.read_file(reader)
hidden = fluid.layers.fc( hidden = img
img, for _ in xrange(10):
size=200, hidden = fluid.layers.fc(
act='tanh', hidden,
bias_attr=fluid.ParamAttr( size=200,
initializer=fluid.initializer.Constant(value=1.0))) act='tanh',
bias_attr=fluid.ParamAttr(
initializer=fluid.initializer.Constant(value=1.0)))
prediction = fluid.layers.fc(hidden, size=10, act='softmax') prediction = fluid.layers.fc(hidden, size=10, act='softmax')
loss = fluid.layers.cross_entropy(input=prediction, label=label) loss = fluid.layers.cross_entropy(input=prediction, label=label)
loss = fluid.layers.mean(loss) loss = fluid.layers.mean(loss)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册