/third_party/mindspore/mindspore/ccsrc/backend/optimizer/gpu/ |
D | batch_norm_relu_fusion.cc | 31 VectorRef batch_norm = VectorRef({prim::kPrimBatchNorm, x_, scale_, bias_, mean_, var_}); in DefinePattern() local 32 VectorRef tuple_get = VectorRef({prim::kPrimTupleGetItem, batch_norm, index_}); in DefinePattern() 44 auto batch_norm = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(tuple_get_item), 0); in Process() local 45 MS_EXCEPTION_IF_NULL(batch_norm); in Process() 46 auto is_train = AnfAlgo::GetCNodePrimitive(batch_norm)->GetAttr("is_training"); in Process() 51 auto format_attr = AnfAlgo::GetCNodePrimitive(batch_norm)->GetAttr("format"); in Process() 54 if (AnfAlgo::GetInputFormat(batch_norm, 0) != kOpFormat_NHWC && format != "NHWC") { in Process() 57 auto shape = AnfAlgo::GetInputDeviceShape(batch_norm, 0); in Process() 62 auto x = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(batch_norm), 0); in Process() 63 auto scale = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(batch_norm), 1); in Process() [all …]
|
D | batch_norm_add_relu_fusion.cc | 31 VectorRef batch_norm = VectorRef({prim::kPrimBatchNorm, x_, scale_, bias_, mean_, var_}); in DefinePattern() local 32 VectorRef tuple_get_item = VectorRef({prim::kPrimTupleGetItem, batch_norm, index_}); in DefinePattern() 47 auto batch_norm = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(tuple_get_item), 0); in Process() local 48 MS_EXCEPTION_IF_NULL(batch_norm); in Process() 49 auto is_train = AnfAlgo::GetCNodePrimitive(batch_norm)->GetAttr("is_training"); in Process() 54 auto format_attr = AnfAlgo::GetCNodePrimitive(batch_norm)->GetAttr("format"); in Process() 57 if (AnfAlgo::GetInputFormat(batch_norm, 0) != kOpFormat_NHWC && format != "NHWC") { in Process() 60 auto shape = AnfAlgo::GetInputDeviceShape(batch_norm, 0); in Process() 65 auto x = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(batch_norm), 0); in Process() 66 auto scale = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(batch_norm), 1); in Process() [all …]
|
D | post_batch_norm_add_relu_fusion.cc | 31 VectorRef batch_norm = VectorRef({prim::kPrimBatchNorm, x_, scale_, bias_, mean_, var_}); in DefinePattern() local 32 VectorRef tuple_get_item = VectorRef({prim::kPrimTupleGetItem, batch_norm, index_}); in DefinePattern() 47 auto batch_norm = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(tuple_get_item), 0); in Process() local 48 MS_EXCEPTION_IF_NULL(batch_norm); in Process() 49 auto is_train = AnfAlgo::GetCNodePrimitive(batch_norm)->GetAttr("is_training"); in Process() 54 auto format_attr = AnfAlgo::GetCNodePrimitive(batch_norm)->GetAttr("format"); in Process() 57 if (AnfAlgo::GetInputFormat(batch_norm, 0) != kOpFormat_NHWC && format != "NHWC") { in Process() 60 auto shape = AnfAlgo::GetInputDeviceShape(batch_norm, 0); in Process() 65 auto x = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(batch_norm), 0); in Process() 66 auto scale = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(batch_norm), 1); in Process() [all …]
|
D | batch_norm_relu_grad_fusion.cc | 86 auto batch_norm = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(save_mean), 0); in Process() local 87 MS_EXCEPTION_IF_NULL(batch_norm); in Process() 88 auto bias = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(batch_norm), 2); in Process()
|
D | batch_norm_add_relu_grad_fusion.cc | 183 auto batch_norm = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(save_mean), 0); in Process() local 184 MS_EXCEPTION_IF_NULL(batch_norm); in Process() 185 auto bias = AnfAlgo::GetInputNode(utils::cast<CNodePtr>(batch_norm), 2); in Process() 187 auto is_train = AnfAlgo::GetCNodePrimitive(batch_norm)->GetAttr("is_training"); in Process()
|
/third_party/mindspore/tests/ut/cpp/python_input/gtest_input/pre_activate/ |
D | batch_norm_grad_infer_fission_test.py | 43 batch_norm = BatchNormGradInfer(input0, input1, input2, input3, input4, input5) 44 …outputs = make_tuple(tuple_getitem(batch_norm, 0), tuple_getitem(batch_norm, 1), tuple_getitem(bat… 50 batch_norm = BatchNormGradTraining(input0, input1, input2, input3, input4, input5) 51 …outputs = make_tuple(tuple_getitem(batch_norm, 0), tuple_getitem(batch_norm, 1), tuple_getitem(bat… 57 batch_norm = BatchNormGradInfer(input0, input1, input2, input3, input4, input5) 58 …outputs = make_tuple(tuple_getitem(batch_norm, 0), tuple_getitem(batch_norm, 1), tuple_getitem(bat…
|
D | fused_batch_norm_fusion_test.py | 54 batch_norm = BatchNorm(input0, input1, input2, input3, input4) 55 sub0 = Sub(var0, tuple_getitem(batch_norm, 1)) 56 sub1 = Sub(var1, tuple_getitem(batch_norm, 2)) 63 depend0 = F.depend(tuple_getitem(batch_norm, 0), assign_sub0) 65 … outputs = make_tuple(depend1, tuple_getitem(batch_norm, 3), tuple_getitem(batch_norm, 4), u1) 71 batch_norm = BatchNorm(input0, input1, input2, input3, input4) 72 sub0 = Sub(Cast(var0, mstype.float32), tuple_getitem(batch_norm, 1)) 73 sub1 = Sub(Cast(var1, mstype.float32), tuple_getitem(batch_norm, 2)) 80 depend0 = F.depend(tuple_getitem(batch_norm, 0), assign_sub0) 82 … outputs = make_tuple(depend1, tuple_getitem(batch_norm, 3), tuple_getitem(batch_norm, 4), u1) [all …]
|
D | single_batch_norm_fission_test.py | 42 batch_norm = BatchNorm(input0, input1, input2, input3, input4) 43 item0 = tuple_getitem(batch_norm, 0) 44 item1 = tuple_getitem(batch_norm, 1) 45 item2 = tuple_getitem(batch_norm, 2) 46 item3 = tuple_getitem(batch_norm, 3) 47 item4 = tuple_getitem(batch_norm, 4)
|
D | batch_norm_bert_fission_test.py | 42 batch_norm = BatchNorm(input0, input1, input2, input3, input4) 43 …outputs = make_tuple(tuple_getitem(batch_norm, 0), tuple_getitem(batch_norm, 3), tuple_getitem(bat…
|
D | batchnorm_to_bninfer.py | 20 batch_norm = P.BatchNorm(is_training=False) variable 42 res = batch_norm(input0, input1, input2, input3, input4) 53 res = batch_norm(input0, input1, input2, input3, input4)
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ir_fusion/ |
D | fused_batch_norm_fusion.cc | 249 …VectorRef batch_norm = VectorRef({batch_norm_var_, data_input0_var_, data_input1_var_, data_input2… in DefinePattern() local 250 VectorRef tuple_getitem0 = VectorRef({prim::kPrimTupleGetItem, batch_norm, index0}); in DefinePattern() 251 VectorRef tuple_getitem1 = VectorRef({prim::kPrimTupleGetItem, batch_norm, index1}); in DefinePattern() 252 VectorRef tuple_getitem2 = VectorRef({prim::kPrimTupleGetItem, batch_norm, index2}); in DefinePattern() 268 …VectorRef batch_norm = VectorRef({batch_norm_var_, data_input0_var_, data_input1_var_, data_input2… in DefinePattern() local 269 VectorRef tuple_getitem0 = VectorRef({prim::kPrimTupleGetItem, batch_norm, index0}); in DefinePattern() 270 VectorRef tuple_getitem1 = VectorRef({prim::kPrimTupleGetItem, batch_norm, index1}); in DefinePattern() 271 VectorRef tuple_getitem2 = VectorRef({prim::kPrimTupleGetItem, batch_norm, index2}); in DefinePattern() 291 …VectorRef batch_norm = VectorRef({batch_norm_var_, data_input0_var_, data_input1_var_, data_input2… in DefinePattern() local 292 VectorRef tuple_getitem0 = VectorRef({prim::kPrimTupleGetItem, batch_norm, index0}); in DefinePattern() [all …]
|
/third_party/mindspore/tests/vm_impl/ |
D | vm_interface.py | 27 setattr(vm, 'batch_norm', batch_norm)
|
D | nn_ops_vm_impl.py | 106 out, x_mean, x_var, running_mean, running_var = vm.batch_norm(x, scale, b, mean, \
|
D | vm_me.py | 107 def batch_norm(x, scale=1, shift=0, mean=None, variance=None, function
|
/third_party/mindspore/tests/ut/python/parallel/ |
D | test_reshape.py | 470 self.batch_norm = nn.BatchNorm1d(512, affine=False) 475 x = self.batch_norm(x) 505 self.batch_norm = bn_with_initialize(2) 512 x = self.batch_norm(x)
|
D | test_one_hot_net.py | 256 self.batch_norm = bn_with_initialize(2) 263 x = self.batch_norm(x)
|
/third_party/mindspore/tests/ut/cpp/transform/ |
D | convert_test.cc | 137 PrimitivePtr batch_norm = prim::kPrimBatchNorm; in TEST_F() local 138 batch_norm->AddAttr("epsilon", MakeValue(0.001f)); in TEST_F() 139 batch_norm->AddAttr("momentum", MakeValue(0.1f)); in TEST_F() 143 inputs.push_back(NewValueNode(batch_norm)); in TEST_F()
|
/third_party/mindspore/tests/ut/python/pynative_mode/vm/ |
D | test_vm.py | 53 output = vm.batch_norm(input_data)
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/ |
D | BUILD.gn | 107 "fp32_grad/batch_norm.c", 429 "fp16_grad/batch_norm.c",
|
/third_party/mindspore/config/ |
D | op_info.config | 185 …"TBE", "async_flag": false, "binfile_name": "batch_norm.so", "compute_cost": 10, "kernel_name": "b…
|