/third_party/mindspore/mindspore/nn/layer/ |
D | embedding.py | 98 def __init__(self, vocab_size, embedding_size, use_one_hot=False, embedding_table='normal', argument 108 self.init_tensor = initializer(embedding_table, [vocab_size, embedding_size]) 118 self.embedding_table = Parameter(self.init_tensor, name='embedding_table') 137 output_for_reshape = self.array_mul(one_hot_ids, self.embedding_table) 139 output_for_reshape = self.gather(self.embedding_table, flat_ids, 0) 146 …self.vocab_size, self.embedding_size, self.use_one_hot, self.embedding_table, self.dtype, self.pad… 248 … self.embedding_table = Parameter(initializer(param_init, [self.vocab_size, self.embedding_size]), 309 self.embedding_table.unique = self.forward_unique 331 self.embedding_table.cache_enable = self.cache_enable 332 self.embedding_table.cache_shape = (self.vocab_cache_size, self.embedding_size) [all …]
|
D | thor_layer.py | 570 def __init__(self, vocab_size, embedding_size, use_one_hot=False, embedding_table='normal', argument 580 self.init_tensor = initializer(embedding_table, [vocab_size, embedding_size]) 587 self.embedding_table = Parameter(self.init_tensor, name='embedding_table') 632 output_for_reshape = self.array_mul(one_hot_ids, self.embedding_table) 638 output_for_reshape = self.gather(self.embedding_table, flat_ids, 0) 641 output_for_reshape = self.gather(self.embedding_table, flat_ids, 0) 648 …self.vocab_size, self.embedding_size, self.use_one_hot, self.embedding_table, self.dtype, self.pad… 747 … self.embedding_table = Parameter(initializer(param_init, [self.vocab_size, self.embedding_size], 809 self.embedding_table.unique = self.forward_unique 861 self.embedding_table.cache_enable = self.cache_enable [all …]
|
/third_party/mindspore/mindspore/ccsrc/ps/ |
D | parameter_server.cc | 395 AddressPtr embedding_table = std::make_shared<kernel::Address>(); in DoEmbeddingLookup() local 396 MS_EXCEPTION_IF_NULL(embedding_table); in DoEmbeddingLookup() 399 inputs.push_back(embedding_table); in DoEmbeddingLookup() 401 embedding_table->addr = table_ptr->data(); in DoEmbeddingLookup() 402 embedding_table->size = table_ptr->size() * sizeof(float); in DoEmbeddingLookup() 499 auto embedding_table = AnfAlgo::GetInputNode(cnode, 0); in GetEmbeddingTableParamPtr() local 500 if (IsPrimitiveCNode(embedding_table, prim::kPrimLoad)) { in GetEmbeddingTableParamPtr() 501 auto embedding_cnode = embedding_table->cast<CNodePtr>(); in GetEmbeddingTableParamPtr() 502 embedding_table = AnfAlgo::GetInputNode(embedding_cnode, 0); in GetEmbeddingTableParamPtr() 504 MS_EXCEPTION_IF_NULL(embedding_table); in GetEmbeddingTableParamPtr() [all …]
|
/third_party/mindspore/mindspore/train/train_thor/ |
D | convert_utils.py | 77 new_subcell.embedding_table = subcell.embedding_table 90 new_subcell.embedding_table = subcell.embedding_table 119 …if isinstance(subcell, (nn.Embedding, nn.EmbeddingLookup)) and subcell.embedding_table.requires_gr…
|
/third_party/mindspore/tests/ut/python/parallel/ |
D | test_dynamic_shape.py | 60 self.embedding_table = Parameter(initializer('normal', [2000, 128]), 70 unique_id_weight = self.embedding_lookp(self.embedding_table, unique_id, 0) 94 self.embedding_table = Parameter(initializer('normal', [2000, 128]), 104 unique_id_weight = self.embedding_lookp(self.embedding_table, unique_id, 0)
|
D | test_uniform_candidate_sampler.py | 34 self.embedding_table = Parameter(embedding_weight, "embedding_weight") 42 lookup = self.gatherv2(self.embedding_table, out1, 0)
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/ps/ |
D | embedding_look_up_ps_kernel.cc | 90 void EmbeddingLookUpPSKernel::UpdateEmbeddings(float *embedding_table, const size_t *lookup_ids, in UpdateEmbeddings() argument 99 auto ret = memcpy_s(embedding_table + IntToSize(index) * outer_dim_size_, dest_len, in UpdateEmbeddings()
|
D | embedding_look_up_ps_kernel.h | 39 void UpdateEmbeddings(float *embedding_table, const size_t *lookup_ids, const float *update_vals,
|
D | pserver_kernel.h | 41 …virtual void UpdateEmbeddings(float *embedding_table, const size_t *lookup_ids, const float *updat… in UpdateEmbeddings() argument
|
/third_party/mindspore/tests/st/model_zoo_tests/wide_and_deep/python_file_for_ci/ |
D | wide_and_deep.py | 157 self.embedding_table = var_map["V_l2"] 202 deep_id_embs = self.gather_v2(self.embedding_table, id_hldr, 0) 211 return out, self.embedding_table 233 predict, embedding_table = self.network(batch_ids, batch_wts) 236 l2_loss_v = self.reduceSum_false(self.square(embedding_table)) / 2
|
/third_party/mindspore/tests/st/networks/models/bert/src/ |
D | bert_model.py | 124 self.embedding_table = Parameter(initializer 144 one_hot_ids, self.embedding_table) 146 output_for_reshape = self.gather(self.embedding_table, flat_ids, 0) 148 return output, self.embedding_table 182 self.embedding_table = Parameter(initializer 214 self.embedding_table) 216 token_type_embeddings = self.gather(self.embedding_table, flat_ids, 0)
|
D | bert_for_pre_training.py | 167 sequence_output, pooled_output, embedding_table = \ 170 embedding_table,
|
/third_party/mindspore/tests/st/networks/ |
D | test_gpu_lstm.py | 70 …self.embedding = nn.Embedding(vocab_size, embed_size, use_one_hot=False, embedding_table=Tensor(we… 71 self.embedding.embedding_table.requires_grad = False
|
/third_party/mindspore/tests/mindspore_test_framework/apps/ |
D | test_bert_parts.py | 64 sequence_output, pooled_output, embedding_table = \ 66 return sequence_output, pooled_output, embedding_table
|
/third_party/mindspore/tests/st/fl/albert/src/ |
D | model.py | 139 self.embedding_table = Parameter(initializer 159 one_hot_ids, self.embedding_table) 161 output_for_reshape = self.gather(self.embedding_table, flat_ids, 0) 163 return output, self.embedding_table 180 self.embedding_table = Parameter(initializer 210 self.embedding_table) 212 token_type_embeddings = self.gather(self.embedding_table, flat_ids, 0)
|
/third_party/mindspore/tests/st/model_zoo_tests/DeepFM/src/ |
D | deepfm.py | 211 self.embedding_table = var_map["V_l2"] 249 fm_id_embs = self.Gatherv2(self.embedding_table, id_hldr, 0) 265 return out, self.fm_w, self.embedding_table
|
/third_party/mindspore/tests/st/ps/cmp_sparse_embedding/ |
D | test_cmp_sparse_embedding.py | 62 net.embedding.embedding_table.set_param_ps()
|
/third_party/mindspore/mindspore/parallel/nn/ |
D | transformer.py | 525 … self.embedding_table = Parameter(initializer(param_init, [self.vocab_size, self.embedding_size]), 540 output = self.gather(self.embedding_table, input_ids, 0) 541 return output, self.embedding_table
|
/third_party/mindspore/mindspore/ccsrc/backend/session/ |
D | session_basic.cc | 2656 auto embedding_table = AnfAlgo::GetInputNode(node->cast<CNodePtr>(), embedding_table_idx); in AssignParamKey() local 2657 size_t key = ps::Worker::GetInstance().SetParamKey(embedding_table->fullname_with_scope()); in AssignParamKey()
|