Home
last modified time | relevance | path

Searched refs:num_labels (Results 1 – 12 of 12) sorted by relevance

/third_party/mindspore/mindspore/explainer/benchmark/_attribution/
Dmetric.py42 def verify_targets(targets, num_labels): argument
51 if targets > num_labels - 1 or targets < 0:
127 def __init__(self, num_labels: int):
129 LabelSensitiveMetric._verify_params(num_labels)
130 self._num_labels = num_labels
131 self._global_results = {i: [] for i in range(num_labels)}
134 def num_labels(self): member in LabelSensitiveMetric
139 def _verify_params(num_labels): argument
141 check_value_type("num_labels", num_labels, int)
142 if num_labels < 1:
Dlocalization.py70 num_labels, argument
73 super(Localization, self).__init__(num_labels)
Drobustness.py48 def __init__(self, num_labels, activation_fn): argument
49 super().__init__(num_labels)
Dfaithfulness.py383 def __init__(self, num_labels, activation_fn, metric="NaiveFaithfulness"): argument
384 super(Faithfulness, self).__init__(num_labels)
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/
Dmnist_op.cc134 …stOp::CheckLabel(const std::string &file_name, std::ifstream *label_reader, uint32_t *num_labels) { in CheckLabel() argument
148 *num_labels = num_items; in CheckLabel()
153 uint32_t num_images, num_labels; in ReadImageAndLabel() local
155 RETURN_IF_NOT_OK(CheckLabel(label_names_[index], label_reader, &num_labels)); in ReadImageAndLabel()
156 CHECK_FAIL_RETURN_UNEXPECTED((num_images == num_labels), in ReadImageAndLabel()
295 uint32_t num_labels; in CountTotalRows() local
296 RETURN_IF_NOT_OK(op->CheckLabel(op->label_names_[i], &label_reader, &num_labels)); in CountTotalRows()
297 CHECK_FAIL_RETURN_UNEXPECTED((num_images == num_labels), in CountTotalRows()
Dmnist_op.h104 …Status CheckLabel(const std::string &file_name, std::ifstream *label_reader, uint32_t *num_labels);
/third_party/mesa3d/src/freedreno/afuc/
Dasm.c49 static unsigned num_labels; variable
63 struct asm_label *label = &labels[num_labels++]; in decl_label()
65 assert(num_labels < ARRAY_SIZE(labels)); in decl_label()
76 for (i = 0; i < num_labels; i++) { in resolve_label()
339 for (i = 0; i < num_labels; i++) { in emit_jumptable()
/third_party/mindspore/tests/st/fl/albert/src/
Dconfig.py94 num_labels=4,
130 num_labels=4,
Dcell_wrapper.py142 def __init__(self, num_labels): argument
153 self.num_labels = num_labels
157 one_hot_labels = self.onehot(label_ids, self.num_labels, self.on_value, self.off_value)
Dmodel.py90 num_labels=5,
123 self.num_labels = num_labels
821 … self.classifier = nn.Dense(config.hidden_size, config.num_labels, weight_init=self.weight_init,
851 self.classifier = nn.Dense(config.hidden_size, config.num_labels,
/third_party/mesa3d/src/gallium/frontends/d3d10umd/
DShaderTGSI.c242 uint num_labels; member
1156 ASSERT(sx->num_labels < sx->max_labels); in Shader_add_label()
1158 sx->labels[sx->num_labels].d3d_label = d3d_label; in Shader_add_label()
1159 sx->labels[sx->num_labels].tgsi_insn_no = tgsi_insn_no; in Shader_add_label()
1160 sx->num_labels++; in Shader_add_label()
1271 sx.num_labels = 0; in Shader_tgsi_translate()
2280 for (j = 0; j < sx.num_labels; ++j) { in Shader_tgsi_translate()
2288 ASSERT(j < sx.num_labels); in Shader_tgsi_translate()
/third_party/mindspore/mindspore/explainer/
D_image_classification_runner.py227 … if isinstance(benchmarker, LabelSensitiveMetric) and benchmarker.num_labels != len(self._labels):