Home
last modified time | relevance | path

Searched refs:slice_index (Results 1 – 14 of 14) sorted by relevance

/third_party/mindspore/mindspore/ops/composite/multitype_ops/
Dgetitem_impl.py92 def _tuple_getitem_by_slice(data, slice_index): argument
103 return _tuple_slice(data, slice_index)
183 def _tensor_getitem_by_slice(data, slice_index): argument
194 return compile_utils.tensor_index_by_slice(data, slice_index)
D_constexpr_utils.py493 def transform_slice_to_ele_list(slice_index, dim_len): argument
495 slice_obj = slice(slice_index.start, slice_index.stop, slice_index.step)
564 def get_stride_info_from_slice(data_shape, slice_index): argument
566 begin, end, step = get_slice_stride(slice_index, data_shape[0])
D_compile_utils.py284 def tensor_index_by_slice(data, slice_index): argument
289 …trides, end_strides, step_strides = const_utils.get_stride_info_from_slice(data_shape, slice_index)
/third_party/mindspore/tests/ut/python/exec/
Dtest_train_with_lars.py51 … self.slice_index, self.params_len, weights = get_net_trainable_reordered_params(self.network)
64 non_bias_weights = weights[0: self.slice_index]
65 non_bias_grads = grads[0: self.slice_index]
66 bias_grads = grads[self.slice_index: self.params_len]
/third_party/mindspore/tests/st/fl/cross_silo_faster_rcnn/src/FasterRcnn/
Drpn.py107 self.slice_index = ()
109 self.slice_index += (0,)
112 self.slice_index += (self.slice_index[index] + shape[0] * shape[1] * num_anchors,)
263 begin = self.slice_index[j]
264 end = self.slice_index[j + 1]
/third_party/mindspore/mindspore/parallel/
D_utils.py156 slice_index = ()
162 slice_index += (s,)
164 new_tensor_numpy[slice_index] = data.asnumpy()
D_tensor.py286 slice_index = _get_tensor_slice_index(dev_mat, tensor_strategy, tensor_map, i)
287 tensor_slices_new[int(slice_index)] = np.array(tensor_slices[i])
/third_party/mindspore/mindspore/common/
Dtensor.py1199 def init_data(self, slice_index=None, shape=None, opt_shard_group=None): argument
1248 self.need_set_seed = ((slice_index is not None) and (global_seed is None))
1253 np.random.seed(slice_index)
1254 self.init.seed = slice_index
1272 def to_tensor(self, slice_index=None, shape=None, opt_shard_group=None): argument
1304 return self.init_data(slice_index, shape, opt_shard_group)
Dparameter.py586 slice_index = int(_get_slice_index(layout[0], layout[1]))
587 init_data_args += (slice_index, layout[2], layout[5])
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/core/
Dtensor.cc1010 Status Tensor::GetSliceOption(const SliceOption &slice_option, const int32_t &slice_index, in GetSliceOption() argument
1021 …CHECK_FAIL_RETURN_UNEXPECTED(shape_.Size() > slice_index, "Invalid shape, should greater than slic… in GetSliceOption()
1026 slice_copy.start_ = HandleNeg(slice_option.slice_.start_, shape_[slice_index]); in GetSliceOption()
1027 slice_copy.stop_ = HandleNeg(slice_option.slice_.stop_, shape_[slice_index]); in GetSliceOption()
1030 dsize_t max_idx = shape_[slice_index]; in GetSliceOption()
1038 dsize_t index = HandleNeg(slice_option.indices_[j], shape_[slice_index]); in GetSliceOption()
1039 CHECK_FAIL_RETURN_UNEXPECTED(index < shape_[slice_index] && index >= 0, in GetSliceOption()
Dtensor.h440 …Status GetSliceOption(const SliceOption &slice_option, const int32_t &slice_index, SliceOption *sl…
/third_party/mindspore/mindspore/train/
Dserialization.py1151 slice_index = int(_get_tensor_slice_index(dev_mat, tensor_strategy, tensor_map, i))
1152 if tensor_slices[i].shape[0] != param_split_shape[slice_index]:
1155 tensor_slices_new[slice_index] = np.array(tensor_slices[i])
/third_party/mindspore/mindspore/ops/operations/
Darray_ops.py3254 slice_index = []
3257 slice_index.append(s)
3258 slice_index = tuple(slice_index)
3259 max_value_slice = max_value_np[slice_index]
3260 min_value_slice = min_value_np[slice_index]
/third_party/python/Lib/test/
Dclinic.test1382 a: slice_index = 12
1383 b: slice_index(accept={int}) = 34
1384 c: slice_index(accept={int, NoneType}) = 56