Home
last modified time | relevance | path

Searched +full:self +full:- +full:assign (Results 1 – 25 of 901) sorted by relevance

12345678910>>...37

/third_party/mindspore/mindspore-src/source/tests/st/syntax/simple_expression/
Dtest_assignment_ops.py1 # Copyright 2021-2023 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
27 class Assign(nn.Cell): class
28 def __init__(self, x, y): argument
29 super(Assign, self).__init__()
30 self.x = Parameter(initializer(x, x.shape), name="x")
31 self.y = Parameter(initializer(y, y.shape), name="y")
32 self.assign = P.Assign()
34 def construct(self): argument
35 self.assign(self.y, self.x)
[all …]
/third_party/rust/rust/src/tools/clippy/tests/ui/borrow_interior_mutable_const/
Dtraits.stderr2 --> $DIR/traits.rs:15:18
4 LL | let _ = &Self::ATOMIC;
7 = help: assign this const to a local or static variable, and use the variable here
9 --> $DIR/traits.rs:1:9
15 --> $DIR/traits.rs:26:18
17 LL | let _ = &Self::ATOMIC;
20 = help: assign this const to a local or static variable, and use the variable here
23 --> $DIR/traits.rs:51:18
25 LL | let _ = &Self::TO_BE_CONCRETE;
28 = help: assign this const to a local or static variable, and use the variable here
[all …]
Denums.stderr2 --> $DIR/enums.rs:22:14
7 = help: assign this const to a local or static variable, and use the variable here
9 --> $DIR/enums.rs:3:9
15 --> $DIR/enums.rs:37:18
17 LL | let _ = &Self::TO_BE_FROZEN_VARIANT;
20 = help: assign this const to a local or static variable, and use the variable here
23 --> $DIR/enums.rs:41:18
25 LL | let _ = &Self::DEFAULTED_ON_FROZEN_VARIANT;
28 = help: assign this const to a local or static variable, and use the variable here
31 --> $DIR/enums.rs:50:18
[all …]
/third_party/mindspore/mindspore-src/source/tests/st/auto_monad/
Dtest_auto_monad_expression.py1 # Copyright 2021-2024 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
34 def __init__(self, var, m, v): argument
36 self.apply_adam = P.Adam()
37 self.var = Parameter(var, name="var")
38 self.m = Parameter(m, name="m")
39 self.v = Parameter(v, name="v")
40 self.addn = P.AddN()
41 self.mul = P.Mul()
43 def construct(self, beta1_power, beta2_power, lr, beta1, beta2, epsilon, grad): argument
[all …]
Dtest_auto_monad.py1 # Copyright 2020-2024 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
60 def __init__(self): argument
62 self.print = P.Print()
64 def construct(self, x, y): argument
65 self.print("input_x:", x, "input_y:", y)
96 def __init__(self): argument
98 self.print = P.Print()
99 self.add = P.Add()
101 def construct(self, x, y): argument
[all …]
Dtest_auto_monad_mindtester.py1 # Copyright 2020-2023 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
33 def __init__(self, grad, network, wrt_params=False, real_inputs_count=None): argument
35 self.network = network
36 self.grad = grad
37 self.sens_param = self.grad.sens_param
38 self.wrt_params = wrt_params
39 self.real_inputs_count = real_inputs_count
40 if self.wrt_params:
41 self.params = ParameterTuple(self.network.trainable_params())
[all …]
/third_party/mindspore/mindspore-src/source/tests/ut/python/graph_syntax/list/
Dtest_list_assign.py1 # Copyright 2020-2022 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
30 Feature: List index assign
31 Description: Test list assign in pynative mode
36 def construct(self): argument
60 Feature: List index assign
61 Description: Test list assign in pynative mode
66 def construct(self): argument
68 list_[-3] = [100]
89 Feature: List index assign
[all …]
/third_party/mindspore/mindspore-src/source/tests/st/ops/cpu/
Dtest_assign_op.py7 # http://www.apache.org/licenses/LICENSE-2.0
28 class Assign(nn.Cell): class
29 def __init__(self, x, y): argument
30 super(Assign, self).__init__()
31 self.x = Parameter(initializer(x, x.shape), name="x")
32 self.y = Parameter(initializer(y, y.shape), name="y")
33 self.assign = P.Assign()
35 def construct(self): argument
36 self.assign(self.y, self.x)
37 return self.y
[all …]
/third_party/mindspore/mindspore-src/source/tests/st/control/inner/
Dtest_031_for_in_while.py1 # Copyright 2021-2022 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
32 def __init__(self): argument
34 self.mul = P.Mul()
35 self.add = P.Add()
36 self.sub = P.Sub()
37 self.assign = P.Assign()
39 self.param_a = Parameter(Tensor(param_a), name='a')
41 self.param_b = Parameter(Tensor(param_b), name='b')
43 def construct(self, x): argument
[all …]
Dtest_320_for_after_while_in_if.py7 # http://www.apache.org/licenses/LICENSE-2.0
32 def __init__(self): argument
34 self.relu = nn.ReLU()
35 self.softmax = nn.Softmax()
36 self.mul = P.Mul()
37 self.add = P.Add()
38 self.sub = P.Sub()
39 self.div = P.Div()
40 self.assign = P.Assign()
42 self.param_a = Parameter(Tensor(param_a), name='a')
[all …]
Dtest_002_single_for.py7 # http://www.apache.org/licenses/LICENSE-2.0
34 def __init__(self): argument
36 self.add = P.Add()
37 self.mul = P.Mul()
39 def construct(self, x, y, z): argument
40 x = self.add(x, y)
42 z = self.add(z, x)
43 y = self.mul(z, y)
47 def __init__(self, net): argument
48 super(GradNet, self).__init__()
[all …]
Dtest_331_for_after_for_in_while.py1 # Copyright 2021-2022 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
32 def __init__(self): argument
34 self.relu = nn.ReLU()
35 self.softmax = nn.Softmax()
36 self.mul = P.Mul()
37 self.add = P.Add()
38 self.sub = P.Sub()
39 self.div = P.Div()
40 self.assign = P.Assign()
[all …]
Dtest_322_for_after_while_in_for.py7 # http://www.apache.org/licenses/LICENSE-2.0
32 def __init__(self): argument
34 self.relu = nn.ReLU()
35 self.softmax = nn.Softmax()
36 self.mul = P.Mul()
37 self.add = P.Add()
38 self.sub = P.Sub()
39 self.div = P.Div()
40 self.assign = P.Assign()
42 self.param_a = Parameter(Tensor(param_a), name='a')
[all …]
Dtest_102_if_after_for.py7 # http://www.apache.org/licenses/LICENSE-2.0
32 def __init__(self): argument
34 self.relu = nn.ReLU()
35 self.mul = P.Mul()
36 self.add = P.Add()
37 self.sub = P.Sub()
38 self.assign = P.Assign()
40 self.param_a = Parameter(Tensor(param_a), name='a')
42 self.param_b = Parameter(Tensor(param_b), name='b')
44 def construct(self, x): argument
[all …]
Dtest_332_for_after_for_in_for.py7 # http://www.apache.org/licenses/LICENSE-2.0
32 def __init__(self): argument
34 self.relu = nn.ReLU()
35 self.softmax = nn.Softmax()
36 self.mul = P.Mul()
37 self.add = P.Add()
38 self.sub = P.Sub()
39 self.div = P.Div()
40 self.assign = P.Assign()
42 self.param_a = Parameter(Tensor(param_a), name='a')
[all …]
Dtest_302_for_after_for.py7 # http://www.apache.org/licenses/LICENSE-2.0
32 def __init__(self): argument
34 self.relu = nn.ReLU()
35 self.mul = P.Mul()
36 self.add = P.Add()
37 self.sub = P.Sub()
38 self.div = P.Div()
39 self.assign = P.Assign()
41 self.param_a = Parameter(Tensor(param_a), name='a')
43 self.param_b = Parameter(Tensor(param_b), name='b')
[all …]
/third_party/rust/rust/tests/ui/lint/dead-code/
Dself-assign.stderr2 --> $DIR/self-assign.rs:10:5
8 --> $DIR/self-assign.rs:6:9
14 --> $DIR/self-assign.rs:13:5
20 --> $DIR/self-assign.rs:22:5
26 --> $DIR/self-assign.rs:25:5
32 --> $DIR/self-assign.rs:34:5
38 --> $DIR/self-assign.rs:38:5
/third_party/mindspore/mindspore-src/source/tests/st/ops/gpu/
Dtest_assign_op.py1 # Copyright 2020-2022 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
26 def __init__(self, param): argument
27 super(Net, self).__init__()
28 self.var = Parameter(param, name="var")
29 self.assign = P.Assign()
31 def construct(self, param): argument
32 self.assign(self.var, param)
33 return self.var
46 assign = Net(var)
[all …]
Dtest_assign_add_op.py1 # Copyright 2019-2022 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
26 def __init__(self, value): argument
27 super(AssignAdd, self).__init__()
28 self.var = Parameter(value, name="var")
29 self.add = P.AssignAdd()
31 def construct(self, y): argument
32 self.add(self.var, y)
33 return self.var
83 Feature: assign add kernel
[all …]
/third_party/mindspore/mindspore-src/source/tests/st/ge/
Drun_io_index.py7 # http://www.apache.org/licenses/LICENSE-2.0
25 Description: Test condition parameter->assign->reshape, parameter->reshape, parameter->return.
29 def __init__(self): argument
31 self.param0 = ms.Parameter(Tensor([4.0], ms.float32), name="param0")
32 self.param1 = ms.Parameter(Tensor([[1, 2, 3], [4, 5, 6]], ms.float32), name="param1")
33 self.assign = P.Assign()
34 self.reshape = P.Reshape()
36 def construct(self, variable, value): argument
37 x = self.assign(variable, value)
38 y = self.reshape(x, (3, 2))
[all …]
/third_party/mindspore/mindspore-src/source/tests/ut/python/graph_syntax/control_flow/
Dtest_while_param.py1 # Copyright 2020-2022 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
25 def __init__(self): argument
27 self.update = ms.Parameter(Tensor(1, ms.float32), "update")
29 def construct(self, x, y, z): argument
32 self.update = self.update + 1
35 return out1, self.update
49 def __init__(self): argument
51 self.update = ms.Parameter(Tensor(1, ms.float32), "update")
53 def construct(self, x, y, z): argument
[all …]
/third_party/mindspore/mindspore-src/source/mindspore/python/mindspore/rewrite/ast_helpers/
Dast_flattener.py7 # http://www.apache.org/licenses/LICENSE-2.0
33 def __init__(self): argument
40 self._flatten_table: dict = {
52 self._transform_functions = []
53 self._symbol_tree = None # Used to get unique name
73 Flatten ast.Assign with continuous targets.
76 if not isinstance(ast_node, ast.Assign):
80 for idx, ast_target in enumerate(ast_node.targets[:-1]):
81 new_assign = ast.Assign(targets=[ast_target], value=ast_node.targets[idx + 1])
83 ast_node.targets = [ast_node.targets[-1]]
[all …]
/third_party/mindspore/mindspore-src/source/tests/st/control/
Dtest_ascend_control_sink.py1 # Copyright 2020-2022 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
29 def __init__(self): argument
31 self.addn = op.AddN()
33 def construct(self, x, y, z, input1, input2): argument
34 addn1 = self.addn([input1, input1, input1])
35 addn2 = self.addn([input2, input2, input2])
36 addn11 = self.addn([addn1, addn1, addn1])
37 addn22 = self.addn([addn2, addn2, addn2])
42 out = self.addn([addn11, addn11])
[all …]
/third_party/mindspore/mindspore-src/source/tests/ut/python/rewrite/
Dtest_ast_finder.py7 # http://www.apache.org/licenses/LICENSE-2.0
23 def __init__(self): argument
24 super(SimpleNet, self).__init__()
25 self.aaa = 1
26 self.bbb = F.add(1, 1)
28 def construct(self, x): argument
29 x = self.aaa + x
30 x = self.bbb + x
37 Description: Use AstFinder to find all Assign ast node.
38 Expectation: AstFinder can find all Assign ast node.
[all …]
/third_party/python/Lib/test/
Dtest_syntax.py12 raise these exceptions-- ast.c, compile.c, future.c, pythonrun.c, and
36 SyntaxError: cannot assign to None
44 SyntaxError: cannot assign to True
52 SyntaxError: cannot assign to __debug__
56 SyntaxError: cannot assign to __debug__
60 SyntaxError: cannot assign to __debug__
68 SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?
80 SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='?
84 SyntaxError: cannot assign to generator expression
88 SyntaxError: cannot assign to literal here. Maybe you meant '==' instead of '='?
[all …]

12345678910>>...37