Browse Source

mod dense

tags/v1.1.0
wanyiming 5 years ago
parent
commit
5ab8007475
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      tests/st/ops/ascend/test_dense.py
  2. +2
    -2
      tests/st/ops/gpu/test_dense.py

+ 1
- 1
tests/st/ops/ascend/test_dense.py View File

@@ -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):


+ 2
- 2
tests/st/ops/gpu/test_dense.py View File

@@ -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…
Cancel
Save