pr to master #8

Open
m7grui4p8 wants to merge 201 commits from p69201753/mindspore:cpu-kernel-reuse-1 into master
4 changed files with 4 additions and 8 deletions
Showing only changes of commit b863324d90 - Show all commits

View File

@ -22,7 +22,7 @@ from mindspore.ops import composite as C
from mindspore.common import set_seed
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend")
set_seed(20)
class Net(nn.Cell):
def __init__(self, shape, seed=0):
@ -31,7 +31,6 @@ class Net(nn.Cell):
self.seed = seed
def construct(self, alpha, beta):
set_seed(20)
return C.gamma(self.shape, alpha, beta, self.seed)

View File

@ -22,7 +22,7 @@ from mindspore.ops import composite as C
from mindspore.common import set_seed
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend")
set_seed(20)
class Net(nn.Cell):
def __init__(self, shape, seed=0):
@ -31,7 +31,6 @@ class Net(nn.Cell):
self.seed = seed
def construct(self, mean, stddev):
set_seed(20)
return C.normal(self.shape, mean, stddev, self.seed)

View File

@ -22,7 +22,7 @@ from mindspore.ops import composite as C
from mindspore.common import set_seed
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend")
set_seed(20)
class Net(nn.Cell):
def __init__(self, shape, seed=0):
@ -31,7 +31,6 @@ class Net(nn.Cell):
self.seed = seed
def construct(self, mean):
set_seed(20)
return C.poisson(self.shape, mean, self.seed)

View File

@ -22,7 +22,7 @@ from mindspore.ops import composite as C
from mindspore.common import set_seed
context.set_context(mode=context.GRAPH_MODE, device_target="Ascend")
set_seed(20)
class Net(nn.Cell):
def __init__(self, shape, seed=0):
@ -31,7 +31,6 @@ class Net(nn.Cell):
self.seed = seed
def construct(self, minval, maxval):
set_seed(20)
return C.uniform(self.shape, minval, maxval, self.seed)