Home
last modified time | relevance | path

Searched refs:one_hot (Results 1 – 25 of 38) sorted by relevance

12

/third_party/mindspore/tests/ut/cpp/ops/
Dtest_ops_one_hot.cc36 auto one_hot = std::make_shared<OneHot>(); in TEST_F() local
37 one_hot->Init(-1); in TEST_F()
38 EXPECT_EQ(one_hot->get_axis(), -1); in TEST_F()
48one_hot->Infer({indice->ToAbstract(), depth->ToAbstract(), on_value->ToAbstract(), off_value->ToAb… in TEST_F()
/third_party/mindspore/mindspore/mindrecord/tools/
Dcifar10.py84 def __init__(self, path, one_hot=True): argument
87 if not isinstance(one_hot, bool):
89 self.one_hot = one_hot
121 if self.one_hot:
Dcifar100.py87 def __init__(self, path, one_hot=True): argument
90 if not isinstance(one_hot, bool):
92 self.one_hot = one_hot
129 if self.one_hot:
/third_party/mindspore/mindspore/nn/probability/dpn/vae/
Dcvae.py74 self.one_hot = OneHot(depth=num_classes)
97 y = self.one_hot(y)
118 sample_y = self.one_hot(sample_y)
138 y = self.one_hot(y)
/third_party/mindspore/tests/st/ops/gpu/
Dtest_one_hot_op.py47 def one_hot(nptype): function
85 one_hot(np.int32)
91 one_hot(np.int64)
/third_party/mindspore/tests/ut/python/parallel/
Dtest_auto_parallel_onehot.py83 self.one_hot = P.OneHot()
90 out1 = self.one_hot(b, 64, self.on_value, self.off_value)
111 self.one_hot = P.OneHot().shard(((1, 8), (), ()))
119 out1 = self.one_hot(b, 64, self.on_value, self.off_value)
Dtest_one_dev.py79 self.one_hot = P.OneHot()
93 labels = self.one_hot(labels, F.shape(logits)[-1], self.on_value, self.off_value)
Dtest_onehot.py35 self.one_hot = P.OneHot(axis=axis).shard(strategy3)
43 label = self.one_hot(b, 64, self.on_value, self.off_value)
Dtest_get_next.py35 self.one_hot = P.OneHot(axis=axis).shard(strategy3)
44 label = self.one_hot(label, 64, self.on_value, self.off_value)
/third_party/mindspore/tests/ut/cpp/dataset/
Dir_tree_adapter_test.cc118 std::shared_ptr<TensorTransform> one_hot = std::make_shared<transforms::OneHot>(10); in TEST_F() local
119 EXPECT_NE(one_hot, nullptr); in TEST_F()
122 ds = ds->Map({one_hot}, {"label"}, {"label"}, {"label"}); in TEST_F()
/third_party/mindspore/tests/st/ops/cpu/
Dtest_one_hot_op.py51 one_hot = NetOneHot()
56 output = one_hot(indices1, indices2, indices3, indices4)
/third_party/mindspore/tests/st/networks/models/deeplabv3/src/
Dlosses.py28 self.one_hot = nn.OneHot(-1, num, 1.0, 0.0)
49 one_hot_labels = self.one_hot(labels)
/third_party/mindspore/tests/st/probability/dpn/
Dtest_gpu_svi_cvae.py38 self.one_hot = nn.OneHot(depth=num_classes)
42 y = self.one_hot(y)
/third_party/mindspore/tests/st/tbe_networks/
Dtest_resnet_cifar_1p.py91 self.one_hot = P.OneHot()
96 label = self.one_hot(label, F.shape(logits)[1], self.one, self.zero)
Dresnet_cifar.py113 self.one_hot = P.OneHot()
118 label = self.one_hot(label, F.shape(logits)[1], self.one, self.zero)
Dtest_resnet_cifar_8p.py102 self.one_hot = P.OneHot()
107 label = self.one_hot(label, F.shape(logits)[1], self.one, self.zero)
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/kernels/ir/
Dbindings.cc129 auto one_hot = std::make_shared<transforms::OneHotOperation>(num_classes); in __anon3fa898e20e02() local
130 THROW_IF_ERROR(one_hot->ValidateParams()); in __anon3fa898e20e02()
131 return one_hot; in __anon3fa898e20e02()
/third_party/mindspore/tests/st/mem_reuse/
Dresnet_cifar_memreuse.py112 self.one_hot = P.OneHot()
117 label = self.one_hot(label, F.shape(logits)[1], self.one, self.zero)
Dresnet_cifar_normal.py112 self.one_hot = P.OneHot()
117 label = self.one_hot(label, F.shape(logits)[1], self.one, self.zero)
/third_party/mindspore/tests/st/nontask_sink/
Dtest_lenet.py103 self.one_hot = P.OneHot()
109 label = self.one_hot(label, F.shape(logits)[1], self.on_value, self.off_value)
/third_party/mindspore/tests/ut/python/dataset/
Dtest_onehot_op.py31 def one_hot(index, depth): function
56 assert dataset_equal_with_function(data1, data2, 0, one_hot, depth)
/third_party/mindspore/tests/st/networks/models/bert/src/
Dbert_model.py131 self.one_hot = P.OneHot()
142 one_hot_ids = self.one_hot(flat_ids, self.vocab_size, self.on_value, self.off_value)
189 self.one_hot = P.OneHot()
211 one_hot_ids = self.one_hot(flat_ids,
334 self.one_hot = nn.OneHot(depth=self.vocab_size)
345 one_hot_relative_positions_matrix = self.one_hot(
/third_party/mindspore/mindspore/ops/_op_impl/cpu/
D__init__.py64 from .one_hot import _one_hot_cpu
/third_party/mindspore/tests/st/pynative/ms_function/
Dtest_pynative_lenet_ms_function.py137 self.one_hot = P.OneHot()
143 label = self.one_hot(label, F.shape(logits)[1], self.on_value, self.off_value)
/third_party/mindspore/tests/st/pynative/
Dtest_pynative_lenet.py104 self.one_hot = P.OneHot()
110 label = self.one_hot(label, F.shape(logits)[1], self.on_value, self.off_value)

12