Home
last modified time | relevance | path

Searched refs:input_mask (Results 1 – 25 of 31) sorted by relevance

12

/third_party/mindspore/mindspore/parallel/nn/
Dloss.py94 def construct(self, logits, label, input_mask): argument
95 self._check_input(logits, label, input_mask)
118 input_mask = P.Reshape()(input_mask, (-1,))
119 numerator = self.sum2(self.mul2(loss_reduce, input_mask))
122 self.sum2(input_mask),
127 def _check_input(self, logits, label, input_mask): argument
131 _check_is_tensor('input_mask', input_mask, self.cls_name)
134 _check_input_dtype(F.dtype(input_mask), "input_mask", [mstype.float32], self.cls_name)
137 _check_input_shape(F.shape(input_mask), "input_mask", self.cls_name, 1)
Dlayers.py585 input_mask = self.slice1(attention_mask, (0, self.seq_length - 1, 0),
587 input_mask = self.reshape(input_mask, (-1, self.seq_length))
588 input_shape = P.Shape()(input_mask) # bs, seq_length
593 local_mask_left = self.reshape(input_mask, local_shape_left)
594 local_mask_right = self.reshape(input_mask, local_shape_right)
Dtransformer.py447 def construct(self, input_mask): argument
448 _check_input_shape(F.shape(input_mask), "input_mask", self.cls_name, 2)
449 …_check_input_dtype(F.dtype(input_mask), "input_mask", [mstype.float32, mstype.float16], self.cls_n…
450 … _check_input_shape_value(F.shape(input_mask), 1, "input_mask", self.cls_name, self.seq_length)
451 input_mask = P.Cast()(self.not_equal(input_mask, 0), mstype.float16)
452 input_shape = P.Shape()(input_mask)
456 mask_left = self.reshape(input_mask, shape_left)
457 mask_right = self.reshape(input_mask, shape_right)
1239 def construct(self, x, input_mask, init_reset=True, batch_valid_length=None): argument
1240 self._check_input(x, input_mask, init_reset, batch_valid_length)
[all …]
/third_party/mindspore/mindspore/_extends/graph_kernel/expanders/
Dgkdropout.py25 input_x, input_mask = self.inputs
31 if input_mask.dtype != input_x.dtype:
32 input_mask = graph_builder.emit('Cast', [input_mask], attrs={'dst_type': input_x.dtype})
33 mask = graph_builder.emit('LessEqual', [input_mask, keep_prob]) # output is bool type
Ddropout_grad.py25 input_dy, input_mask = self.inputs
29 result = graph_builder.emit('Mul', [result, input_mask])
/third_party/mindspore/tests/mindspore_test_framework/apps/
Dtest_bert_parts.py86 input_ids, input_mask, token_type_id, \ variable
93 'desc_inputs': [input_ids, input_mask, token_type_id,
99 'desc_inputs': [input_ids, input_mask, token_type_id,
105 'desc_inputs': [input_ids, input_mask, token_type_id,
110 'desc_inputs': [input_ids, input_mask, token_type_id,
116 'desc_inputs': [input_ids, input_mask, token_type_id, masked_lm_positions],
120 'desc_inputs': [input_ids, input_mask, token_type_id, masked_lm_positions],
125 'desc_inputs': [input_ids, input_mask, token_type_id, masked_lm_positions],
206 'desc_inputs': [input_ids, input_mask, token_type_id, masked_lm_positions],
/third_party/mindspore/tests/st/networks/models/bert/src/
Dcluener_evaluation.py41 input_ids, input_mask, token_type_id = feature
43 input_mask = Tensor(np.array(input_mask), mstype.int32)
46 … backpointers, best_tag_id = model.predict(input_ids, input_mask, token_type_id, Tensor(1))
53 logits = model.predict(input_ids, input_mask, token_type_id, Tensor(1))
Dsample_process.py41 input_mask = [1] * len(input_ids)
44 input_mask.append(0)
49 assert len(input_mask) == max_seq_len
52 feature = (input_ids, input_mask, segment_ids)
Dbert_for_pre_training.py165 def construct(self, input_ids, input_mask, token_type_id, argument
168 self.bert(input_ids, token_type_id, input_mask)
244 input_mask, argument
251 self.bert(input_ids, input_mask, token_type_id, masked_lm_positions)
294 input_mask, argument
304 input_mask,
311 input_mask,
383 input_mask, argument
393 input_mask,
409 input_mask,
Dbert_model.py811 self.input_mask = None
814 self.input_mask = initializer(
824 def construct(self, input_mask): argument
826 input_mask = self.input_mask
828 input_mask = self.cast(self.reshape(input_mask, self.shape), mstype.float32)
829 attention_mask = self.batch_matmul(self.broadcast_ones, input_mask)
915 def construct(self, input_ids, token_type_ids, input_mask): argument
925 attention_mask = self._create_attention_mask_from_input_mask(input_mask)
/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
30 self.input_mask = input_mask
57 input_mask = [1] * len(input_ids)
62 input_mask += padding
66 assert len(input_mask) == max_seq_length
71 input_mask=input_mask,
134 np.array(feature.input_mask),
Dcell_wrapper.py170 def construct(self, input_ids, input_mask, token_type_id, label_ids): argument
171 logits = self.cls_network(input_ids, input_mask, token_type_id)
184 def construct(self, input_ids, input_mask, token_type_id, label_ids): argument
185 prediction_scores = self.mlm_network(input_ids, input_mask, token_type_id)
255 def construct(self, input_ids, input_mask, token_type_id, label_ids): argument
259 loss = self.network(input_ids, input_mask, token_type_id, label_ids)
261 input_mask,
288 def construct(self, input_ids, input_mask, token_type_id, label_ids): argument
290 loss = self.network(input_ids, input_mask, token_type_id, label_ids)
292 input_mask,
Dmodel.py709 def construct(self, input_mask): argument
710 attention_mask = self.cast(self.reshape(input_mask, self.shape), mstype.float32)
749 def construct(self, input_ids, token_type_ids, input_mask): argument
758 attention_mask = self._create_attention_mask_from_input_mask(input_mask)
828 def construct(self, input_ids, input_mask, token_type_id): argument
830 _, pooled_output = self.albert(input_ids, token_type_id, input_mask)
861 def construct(self, input_ids, input_mask, token_type_id): argument
863 sequence_output, pooled_output = self.albert(input_ids, token_type_id, input_mask)
887 def construct(self, input_ids, input_mask, token_type_id): argument
889 sequence_output, _ = self.albert(input_ids, token_type_id, input_mask)
/third_party/mindspore/mindspore/lite/examples/export_models/models/
Dtinybert_train_export.py160 input_mask = M.Tensor(np.zeros((32, 128), np.int32)) variable
175 export(net, input_ids, token_type_id, input_mask, label,
177 y = net(input_ids, token_type_id, input_mask, label)
179 out = net.network.bert(input_ids, token_type_id, input_mask)
185 save_t(input_mask, path + 'tinybert_input4.bin')
/third_party/libinput/include/linux/linux/
Dinput.h116 struct input_mask { struct
208 #define EVIOCGMASK _IOR('E', 0x92, struct input_mask) /* Get event-masks */
231 #define EVIOCSMASK _IOW('E', 0x93, struct input_mask) /* Set event-masks */
/third_party/libevdev/include/linux/linux/
Dinput.h121 struct input_mask { struct
213 #define EVIOCGMASK _IOR('E', 0x92, struct input_mask) /* Get event-masks */
236 #define EVIOCSMASK _IOW('E', 0x93, struct input_mask) /* Set event-masks */
/third_party/libinput/include/linux/freebsd/
Dinput.h117 struct input_mask { struct
209 #define EVIOCGMASK _IOW('E', 0x92, struct input_mask) /* Get event-masks */
232 #define EVIOCSMASK _IOW('E', 0x93, struct input_mask) /* Set event-masks */
/third_party/mindspore/mindspore/lite/test/config/
Dmodels_tflite.cfg190 albert_lite_base_squadv1_1.tflite;3:input_ids,input_mask,segment_ids
191 mobilebert_1_default_1.tflite;3:input_ids,input_mask,segment_ids
194 hdc_tb_cn_neg.tflite;3:input_ids,input_mask,segment_ids 0.5
199 lite-model_albert_lite_base_squadv1_metadata_1.tflite;3:input_ids,input_mask,segment_ids
200 lite-model_mobilebert_1_metadata_1.tflite;3:input_ids,input_mask,segment_ids
Dmodels_tf.cfg99 hiai_nlu_model.pb;3:input_ids,input_mask,segment_ids;1,16:1,16:1,16
104 hiai_nlu_model_v2.pb;7:input_ids,input_mask,segment_ids,prev_intent,filling_slots,followup_intents,…
106 hiai_nlu_model_single.pb;3:input_ids,input_mask,segment_ids;1,32:1,32:1,32
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/gpu/nn/
Dpooling_grad_gpu_kernel.h88 auto input_mask = AnfAlgo::GetInputDeviceShape(kernel_node, 1); in InitShape() local
97 …is_null_input_ = CHECK_NULL_INPUT(input_shape) || CHECK_NULL_INPUT(input_mask) || CHECK_NULL_INPUT… in InitShape()
104 CheckTensorSize({input_shape, input_mask, dout_shape, output_shape}); in InitShape()
112 SetDimA(input_mask, dimAy, nbDims, data_format); in InitShape()
113 SetStrideA(input_mask, strideAiny, nbDims, data_format); in InitShape()
/third_party/mesa3d/src/gallium/drivers/llvmpipe/
Dlp_linear.c95 unsigned input_mask = variant->linear_input_mask; in lp_fs_linear_run() local
140 while (input_mask) { in lp_fs_linear_run()
141 int i = u_bit_scan(&input_mask); in lp_fs_linear_run()
/third_party/mindspore/tests/ut/python/mindrecord/
Dutils.py207 input_mask = np.reshape(np.array(mask), [1, -1])
214 "input_mask": input_mask,
/third_party/mindspore/tests/ut/python/nn/
Dtest_transformer.py234 input_mask = Tensor(np.ones(1).astype(np.float32))
236 _cell_graph_executor.compile(model, logits, labels, input_mask)
/third_party/mindspore/tests/ut/python/parallel/
Dtest_parallel_transformer.py118 input_mask = Tensor(np.ones((2 * seq,)), mstype.float32)
124 memory_mask, label, input_mask)
556 input_mask = Tensor(np.ones((2 * 64,)), mstype.float32)
557 dataset = Dataset(embed_ids, labels, input_mask)
/third_party/mindspore/tests/ut/python/dataset/
Dtest_minddataset_padded.py650 input_mask = np.reshape(np.array(mask), [1, -1])
657 "input_mask": input_mask,

12