diff --git a/doc/fluid/advanced_guide/distributed_training/fleet_api_howto_cn.rst b/doc/fluid/advanced_guide/distributed_training/fleet_api_howto_cn.rst index 15d5508a914563dc20e1a33cac352dee7352213f..21f3ea861452ee7bf1dc12fdd65bd8fdcbc8ea6c 100644 --- a/doc/fluid/advanced_guide/distributed_training/fleet_api_howto_cn.rst +++ b/doc/fluid/advanced_guide/distributed_training/fleet_api_howto_cn.rst @@ -51,8 +51,8 @@ API最常见的两种使用场景,用一个模型做示例,目的是让用 from nets import mlp from utils import gen_data - input_x = fluid.layers.data(name="x", shape=[32], dtype='float32') - input_y = fluid.layers.data(name="y", shape=[1], dtype='int64') + input_x = fluid.data(name="x", shape=[None, 32], dtype='float32') + input_y = fluid.data(name="y", shape=[None, 1], dtype='int64') cost = mlp(input_x, input_y) optimizer = fluid.optimizer.SGD(learning_rate=0.01) @@ -79,8 +79,8 @@ API最常见的两种使用场景,用一个模型做示例,目的是让用 from paddle.fluid.incubate.fleet.base import role_maker from utils import gen_data - input_x = fluid.layers.data(name="x", shape=[32], dtype='float32') - input_y = fluid.layers.data(name="y", shape=[1], dtype='int64') + input_x = fluid.data(name="x", shape=[None, 32], dtype='float32') + input_y = fluid.data(name="y", shape=[None, 1], dtype='int64') cost = mlp(input_x, input_y) optimizer = fluid.optimizer.SGD(learning_rate=0.01) @@ -119,8 +119,8 @@ API最常见的两种使用场景,用一个模型做示例,目的是让用 from paddle.fluid.incubate.fleet.base import role_maker from utils import gen_data - input_x = fluid.layers.data(name="x", shape=[32], dtype='float32') - input_y = fluid.layers.data(name="y", shape=[1], dtype='int64') + input_x = fluid.data(name="x", shape=[None, 32], dtype='float32') + input_y = fluid.data(name="y", shape=[None, 1], dtype='int64') cost = mlp(input_x, input_y) optimizer = fluid.optimizer.SGD(learning_rate=0.01)