Home
last modified time | relevance | path

Searched refs:seq_length (Results 1 – 25 of 32) sorted by relevance

12

/third_party/mindspore/mindspore/nn/layer/
Drnns.py158 def variable_recurrent(self, x, h, seq_length, w_ih, w_hh, b_ih, b_hh): argument
168 seq_length = P.Cast()(seq_length, mstype.float32)
169 seq_length = P.BroadcastTo((hidden_size, -1))(seq_length)
170 seq_length = P.Cast()(seq_length, mstype.int32)
171 seq_length = P.Transpose()(seq_length, (1, 0))
180 seq_cond = seq_length > t
194 def construct(self, x, h, seq_length, w_ih, w_hh, b_ih, b_hh): argument
195 if seq_length is None:
197 return self.variable_recurrent(x, h, seq_length, w_ih, w_hh, b_ih, b_hh)
275 def _stacked_bi_dynamic_rnn(self, x, h, seq_length): argument
[all …]
/third_party/mindspore/tests/st/fl/albert/src/
Ddataset.py28 def __init__(self, input_ids, input_mask, segment_ids, label_id, seq_length=None): argument
33 self.seq_length = seq_length
44 seq_length = len(tokens)
45 if seq_length > max_seq_length - 2:
47 rand_index = np.random.randint(0, seq_length)
48 tokens = [tokens[_] if _ < seq_length else tokens[_ - seq_length]
58 seq_length = len(input_ids)
74 seq_length=seq_length))
137 np.array(feature.seq_length))
Dmodel.py59 seq_length=256, argument
92 self.seq_length = seq_length
151 self.shape = (-1, config.seq_length, config.embedding_size)
190 self.shape = (-1, config.seq_length, config.embedding_size)
390 self.from_seq_length = config.seq_length
391 self.to_seq_length = config.seq_length
416 self.shape_from = (-1, config.seq_length, config.num_attention_heads, self.size_per_head)
417 self.shape_to = (-1, config.seq_length, config.num_attention_heads, self.size_per_head)
435 self.shape_return = (-1, config.seq_length, config.hidden_size)
439 RelaPosEmbeddingsGenerator(length=config.seq_length,
[all …]
Dconfig.py63 seq_length=8,
99 seq_length=8,
/third_party/mindspore/mindspore/parallel/nn/
Dlayers.py486 seq_length=Validator.check_positive_int,
494 seq_length=1024, argument
505 self.seq_length = seq_length
510 self.block_num = seq_length // block_size
512 self.global_size = seq_length // 4
520 if self.seq_length != 1024:
531 global_mask_original = np.ones((self.seq_length, self.global_size), dtype=np.float16)
532 for i in range(self.seq_length):
538 …global_mask_fx = global_mask_original.reshape((self.seq_length // 16, 16, self.global_size // 16, …
541 …sk = global_mask.reshape((self.batch_size * self.global_size // 16, self.seq_length // 16, 16, 16))
[all …]
Dtransformer.py432 @_args_type_validator_check(seq_length=Validator.check_positive_int,
434 def __init__(self, seq_length, parallel_config=default_dpmp_config): argument
436 self.seq_length = seq_length
442 ones = np.ones(shape=(seq_length, seq_length))
450 … _check_input_shape_value(F.shape(input_mask), 1, "input_mask", self.cls_name, self.seq_length)
790 self.seq_length = src_seq_length
791 …self.attention_mask = Tensor(np.tril(np.ones(shape=(self.seq_length, self.seq_length))), mstype.in…
863 current_key = self.mul1(self.tile(key, (1, 1, 1, self.seq_length)),
865 current_value = self.mul1(self.tile(value, (1, 1, self.seq_length, 1)),
873 … attention_mask = F.reshape(self.attention_mask, (self.seq_length, self.seq_length, 1, 1))
[all …]
/third_party/mindspore/tests/st/networks/models/bert/src/
DCRF.py40 def __init__(self, tag_to_index, batch_size=1, seq_length=128, is_training=True): argument
47 self.seq_length = seq_length
96 label2 = labels[:, :self.seq_length, :]
103 stop_value_index = labels[:, (self.seq_length-1):self.seq_length, :]
116 for idx in range(self.seq_length):
133 for idx in range(self.seq_length):
Dbert_model.py64 seq_length=128, argument
83 self.seq_length = seq_length
604 seq_length, argument
625 from_seq_length=seq_length,
626 to_seq_length=seq_length,
675 seq_length=512, argument
690 seq_length=seq_length,
744 seq_length, argument
764 seq_length=seq_length,
781 self.out_shape = (batch_size, seq_length, hidden_size)
[all …]
Dconfig.py58 seq_length=128,
79 seq_length=128,
100 seq_length=512,
Devaluation_config.py36 seq_length=128,
Dfinetune_config.py56 seq_length=128,
/third_party/node/deps/icu-small/source/i18n/
Dcsr2022.cpp49 int32_t seq_length = (int32_t)uprv_strlen((const char *) seq); in match_2022() local
51 if (textLen-i >= seq_length) { in match_2022()
53 while(j < seq_length) { in match_2022()
62 i += seq_length-1; in match_2022()
/third_party/skia/third_party/externals/icu/source/i18n/
Dcsr2022.cpp49 int32_t seq_length = (int32_t)uprv_strlen((const char *) seq); in match_2022() local
51 if (textLen-i >= seq_length) { in match_2022()
53 while(j < seq_length) { in match_2022()
62 i += seq_length-1; in match_2022()
/third_party/flutter/skia/third_party/externals/icu/source/i18n/
Dcsr2022.cpp49 int32_t seq_length = (int32_t)uprv_strlen((const char *) seq); in match_2022() local
51 if (textLen-i >= seq_length) { in match_2022()
53 while(j < seq_length) { in match_2022()
62 i += seq_length-1; in match_2022()
/third_party/icu/icu4c/source/i18n/
Dcsr2022.cpp49 int32_t seq_length = (int32_t)uprv_strlen((const char *) seq); in match_2022() local
51 if (textLen-i >= seq_length) { in match_2022()
53 while(j < seq_length) { in match_2022()
62 i += seq_length-1; in match_2022()
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/
Dreverse_sequence_fp32.c29 …int32_t seq_length = para->is_seq_length_int32_ ? *((int32_t *)input1 + batch) : *((int64_t *)inpu… in ReverseSequence() local
30 for (int n = 0; n < seq_length; ++n) { in ReverseSequence()
31 … const float *in_seq = in_batch + (seq_length - 1 - n) * para->input_stride_[para->seq_axis_]; in ReverseSequence()
/third_party/mindspore/tests/mindspore_test_framework/apps/
Dtest_bert_check_gradient.py238 seq_length=128,
254 seq_length=128,
271 seq_length=128,
313 seq_length=128,
383 seq_length=128,
Dtest_bert_compare_with_npy.py499 seq_length=128,
516 seq_length=128,
531 seq_length=128,
570 seq_length=128,
/third_party/mindspore/tests/ut/python/nn/
Dtest_transformer.py113 seq_length=16,
128 model = TransformerEncoderLayer(batch_size=2, hidden_size=8, ffn_hidden_size=64, seq_length=16,
141 seq_length=16,
240 model = AttentionMask(seq_length=19)
247 seq_length=1024,
/third_party/mindspore/tests/ut/cpp/python_input/gtest_input/tbe/
Dtbe_json_creator_test.py62 def func_dynamic_rnn(x, w, b, seq_length, init_h, init_c): argument
63 return DynamicRNN(x, w, b, seq_length, init_h, init_c)
/third_party/mindspore/mindspore/ccsrc/transform/graph_ir/op_declare/
Drnn_declare.cc63 … {4, INPUT_DESC(seq_length)}, {5, INPUT_DESC(init_h)}, {6, INPUT_DESC(init_c)},
107 … {4, INPUT_DESC(bias_input)}, {5, INPUT_DESC(bias_hidden)}, {6, INPUT_DESC(seq_length)},
129 {13, INPUT_DESC(seq_length)}, {14, INPUT_DESC(mask)}};
/third_party/mindspore/tests/st/fl/albert/
Dcloud_train.py194 input_ids = Tensor(np.zeros((train_cfg.batch_size, server_net_cfg.seq_length), np.int32))
195 … attention_mask = Tensor(np.zeros((train_cfg.batch_size, server_net_cfg.seq_length), np.int32))
196 … token_type_ids = Tensor(np.zeros((train_cfg.batch_size, server_net_cfg.seq_length), np.int32))
/third_party/mindspore/tests/st/model_zoo_tests/transformer/
Dtest_transformer.py60 seq_length=128,
77 seq_length=128,
/third_party/mindspore/tests/ut/python/parallel/
Dtest_parallel_transformer.py356 seq_length=16,
465 seq_length=1024,
484 seq_length=1024,
503 seq_length=1024,
522 seq_length=1024,
/third_party/mindspore/tests/perf_test/bert/
Dtest_bert_train.py63 seq_length=128,
80 seq_length=128,

12