提交 7add9976 编写于 作者: S simson

fix wrong order of init data in docs

上级 6532d89f
......@@ -192,9 +192,9 @@ from mindspore import context, Tensor
from mindspore.common.api import ms_function
context.set_context(mode=context.PYNATIVE_MODE, device_target="GPU")
conv_obj.init_parameters_data()
conv_obj = nn.Conv2d(in_channels=3, out_channels=4, kernel_size=3, stride=2, padding=0)
conv_obj.init_parameters_data()
@ms_function
def conv_fn(x):
res = conv_obj(x)
......
......@@ -192,9 +192,9 @@ from mindspore import context, Tensor
from mindspore.common.api import ms_function
context.set_context(mode=context.PYNATIVE_MODE, device_target="GPU")
conv_obj.init_parameters_data()
conv_obj = nn.Conv2d(in_channels=3, out_channels=4, kernel_size=3, stride=2, padding=0)
conv_obj.init_parameters_data()
@ms_function
def conv_fn(x):
res = conv_obj(x)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册