Home
last modified time | relevance | path

Searched refs:num_class (Results 1 – 25 of 36) sorted by relevance

12

/third_party/mindspore/tests/perf_test/
Dtest_lenet.py36 num_class = 10 variable
55 net = LeNet(num_class=num_class)
67 net = LeNet5(num_class=num_class)
72 sens = Tensor(np.ones([batch_size, num_class]).astype(np.float32))
Dlenet.py53 def __init__(self, num_class=10, channel=1): argument
55 self.num_class = num_class
60 self.fc3 = fc_with_initialize(84, self.num_class)
/third_party/mindspore/tests/st/networks/models/deeplabv3/src/
Dmiou_precision.py34 def __init__(self, num_class=21): argument
36 if not isinstance(num_class, int):
37 raise TypeError('num_class should be integer type, but got {}'.format(type(num_class)))
38 if num_class < 1:
39 raise ValueError('num_class must be at least 1, but got {}'.format(num_class))
40 self._num_class = num_class
/third_party/mindspore/tests/st/quantization/lenet_quant/
Dlenet_fusion.py33 def __init__(self, num_class=10, channel=1): argument
36 self.num_class = num_class
44 self.fc3 = nn.DenseBnAct(84, self.num_class)
/third_party/mindspore/tests/st/fl/mobile/src/
Dmodel.py47 def __init__(self, num_class=10, channel=3): argument
49 self.num_class = num_class
54 self.fc3 = fc_with_initialize(84, self.num_class)
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/
Dctcloss_cpu_kernel.cc41 size_t num_class, size_t batch_size, size_t b) { in InnerSoftMax() argument
46 for (size_t c = 0; c < num_class; ++c) { in InnerSoftMax()
47 if (inputs_addr[t * batch_size * num_class + b * num_class + c] > maxCoeff) { in InnerSoftMax()
48 maxCoeff = inputs_addr[t * batch_size * num_class + b * num_class + c]; in InnerSoftMax()
52 for (size_t c = 0; c < num_class; ++c) { in InnerSoftMax()
53 …sumCoeff += static_cast<T>(exp(inputs_addr[t * batch_size * num_class + b * num_class + c] - maxCo… in InnerSoftMax()
55 static_cast<T>(exp(inputs_addr[t * batch_size * num_class + b * num_class + c] - maxCoeff)); in InnerSoftMax()
58 for (size_t c = 0; c < num_class; ++c) { in InnerSoftMax()
/third_party/mindspore/tests/st/gnn/
Dgat.py65 num_class, argument
75 self.num_class = Validator.check_positive_int(num_class)
106 self.num_class,
Dtest_gat_model.py29 num_class = 7
39 num_class,
/third_party/mindspore/tests/st/fl/hybrid_lenet/src/
Dmodel.py48 def __init__(self, num_class=10, channel=3): argument
50 self.num_class = num_class
55 self.fc3 = fc_with_initialize(84, self.num_class)
/third_party/mindspore/tests/st/fl/cross_silo_lenet/src/
Dmodel.py48 def __init__(self, num_class=10, channel=3): argument
50 self.num_class = num_class
55 self.fc3 = fc_with_initialize(84, self.num_class)
/third_party/mindspore/tests/st/hcom/
Dhcom_sparsetensor.py36 def __init__(self, size=1024, batch_size=32, image_size=(3, 224, 224), num_class=10, argument
44 self.num_class = num_class
98 target = np.random.randint(0, self.num_class, size=(self.rank_size, self.rank_batch_size))
105 target_onehot = np.zeros(shape=(self.rank_batch_size, self.num_class))
147 …ds = FakeData(size=8, batch_size=batch_size, num_class=8, image_size=(), use_parallel=use_parallel)
/third_party/mindspore/tests/st/ps/multi_full_ps/
Dtest_multi_full_ps.py67 def __init__(self, num_class=10, channel=3): argument
69 self.num_class = num_class
74 self.fc3 = fc_with_initialize(84, self.num_class)
/third_party/mindspore/tests/st/probability/transforms/
Dtest_transform_bnn_model.py63 def __init__(self, num_class=10): argument
65 self.num_class = num_class
70 self.fc3 = fc_with_initialize(84, self.num_class)
Dtest_transform_bnn_layer.py64 def __init__(self, num_class=10): argument
66 self.num_class = num_class
71 self.fc3 = fc_with_initialize(84, self.num_class)
/third_party/mindspore/tests/st/probability/bnn_layers/
Dtest_bnn_layer.py63 def __init__(self, num_class=10): argument
65 self.num_class = num_class
70 self.fc3 = fc_with_initialize(84, self.num_class)
/third_party/mindspore/tests/st/probability/toolbox/
Dtest_uncertainty.py51 def __init__(self, num_class=10, channel=1): argument
53 self.num_class = num_class
58 self.fc3 = fc_with_initialize(84, self.num_class)
/third_party/mindspore/tests/st/ops/ascend/
Dtest_sparseSoftmaxCrossEntropyWithLogits.py37 num_class = logits_shape[1]
38 labels = np.random.randint(low=0, high=num_class - 1, size=labels_shape).astype(np.int32)
41 features_reshape = np.reshape(features, [-1, num_class])
/third_party/mindspore/tests/ut/python/pynative_mode/
Dtest_hook.py96 def __init__(self, num_class=10): argument
98 self.num_class = num_class
106 self.fc3 = fc_with_initialize(84, self.num_class)
150 label = Tensor(np.ones([net.batch_size, net.num_class]).astype(np.float32))
/third_party/mindspore/tests/st/ps/full_ps/
Dtest_full_ps_lenet.py61 def __init__(self, num_class=10, channel=1): argument
63 self.num_class = num_class
68 self.fc3 = fc_with_initialize(84, self.num_class)
/third_party/mindspore/tests/st/pynative/
Dtest_pynative_hook.py74 def __init__(self, hook_function, cell_hook_function, num_class=10): argument
76 self.num_class = num_class
83 self.fc3 = fc_with_initialize(84, self.num_class)
180 label = Tensor(np.ones([net.batch_size, net.num_class]).astype(np.float32))
Dtest_pynative_lenet.py66 def __init__(self, num_class=10): argument
68 self.num_class = num_class
74 self.fc3 = fc_with_initialize(84, self.num_class)
/third_party/mindspore/tests/st/fusion/
Dtest_conv_bn1_fusion.py27 num_class = 10 variable
69 self.dense = nn.Dense(output_channel, num_class)
97 self.dense = nn.Dense(output_channel, num_class)
123 self.dense = nn.Dense(output_channel, num_class)
/third_party/mindspore/tests/st/nontask_sink/
Dtest_lenet.py65 def __init__(self, num_class=10): argument
67 self.num_class = num_class
73 self.fc3 = fc_with_initialize(84, self.num_class)
/third_party/mindspore/tests/st/pynative/ms_function/
Dtest_pynative_lenet_ms_function.py103 def __init__(self, num_class=10): argument
105 self.num_class = num_class
111 self.fc3 = fc_with_initialize(84, self.num_class)
/third_party/mindspore/tests/st/profiler/
Dtest_profiler.py59 def __init__(self, num_class=10, channel=1): argument
61 self.num_class = num_class
66 self.fc3 = fc_with_initialize(84, self.num_class)

12