forked from mindspore-Ecosystem/mindspore
!9417 Mod test_dense in ut
From: @wanyiming Reviewed-by: @zh_qh,@kingxian Signed-off-by: @kingxian
This commit is contained in:
commit
9466429fdd
|
@ -35,7 +35,7 @@ class MultiLayerDense(nn.Cell):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(MultiLayerDense, self).__init__()
|
super(MultiLayerDense, self).__init__()
|
||||||
self.dense1 = nn.Dense(in_channels=256, out_channels=512)
|
self.dense1 = nn.Dense(in_channels=256, out_channels=512)
|
||||||
self.dense1 = nn.Dense(in_channels=512, out_channels=1024)
|
self.dense2 = nn.Dense(in_channels=512, out_channels=1024)
|
||||||
|
|
||||||
@ms_function
|
@ms_function
|
||||||
def construct(self, x):
|
def construct(self, x):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright 2019 Huawei Technologies Co., Ltd
|
# Copyright 2020 Huawei Technologies Co., Ltd
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
@ -33,7 +33,7 @@ class MultiLayerDense(nn.Cell):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(MultiLayerDense, self).__init__()
|
super(MultiLayerDense, self).__init__()
|
||||||
self.dense1 = nn.Dense(in_channels=256, out_channels=512)
|
self.dense1 = nn.Dense(in_channels=256, out_channels=512)
|
||||||
self.dense1 = nn.Dense(in_channels=512, out_channels=1024)
|
self.dense2 = nn.Dense(in_channels=512, out_channels=1024)
|
||||||
|
|
||||||
def construct(self, x):
|
def construct(self, x):
|
||||||
x = self.dense1(x)
|
x = self.dense1(x)
|
||||||
|
|
Loading…
Reference in New Issue