Edit by browser
This commit is contained in:
parent
3535fe1f5f
commit
1109ba19a3
|
@ -1,4 +1,3 @@
|
|||
|
||||
import mindspore.nn as nn
|
||||
from mindspore.common.initializer import TruncatedNormal
|
||||
|
||||
|
@ -22,16 +21,16 @@ def fc_with_initialize(input_channels, out_channels):
|
|||
fc layer weight initial
|
||||
"""
|
||||
# 请在此添加代码完成本关任务
|
||||
# **********Begin*********#
|
||||
##提示:完成初始化代码
|
||||
#********** Begin *********#
|
||||
## 提示:完成初始化代码
|
||||
|
||||
# **********End**********#
|
||||
#********** End **********#
|
||||
|
||||
class LeNet5(nn.Cell):
|
||||
"""
|
||||
Lenet network structure
|
||||
"""
|
||||
#define the operator required
|
||||
# define the operator required
|
||||
def __init__(self):
|
||||
super(LeNet5, self).__init__()
|
||||
self.conv1 = conv(1, 6, 5)
|
||||
|
@ -46,8 +45,8 @@ class LeNet5(nn.Cell):
|
|||
#use the preceding operators to construct networks
|
||||
def construct(self, x):
|
||||
# 请在此添加代码完成本关任务
|
||||
# **********Begin*********#
|
||||
##提示:根据教程内容完成网络定义即可
|
||||
#********** Begin *********#
|
||||
## 提示:根据教程内容完成网络定义即可
|
||||
|
||||
# **********End**********#
|
||||
#********** End **********#
|
||||
return x
|
||||
|
|
Loading…
Reference in New Issue