/third_party/mindspore/mindspore/ccsrc/minddata/dataset/engine/datasetops/ |
D | bucket_batch_by_length_op.cc | 136 std::vector<dsize_t> pad_shape = pair.second.first.AsVector(); in PadAndBatchBucket() local 138 for (size_t i = 0; i < pad_shape.size(); i++) { in PadAndBatchBucket() 139 if (pad_shape[i] == TensorShape::kDimUnknown) { in PadAndBatchBucket() 146 pad_shape[i] = bucket_boundaries_[bucket_index + 1] - 1; in PadAndBatchBucket() 150 pair.second.first = TensorShape(pad_shape); in PadAndBatchBucket()
|
/third_party/mindspore/tests/ut/python/dataset/ |
D | test_pad_end_op.py | 27 def pad_compare(array, pad_shape, pad_value, res): argument 30 data = data.map(operations=ops.PadEnd(pad_shape, pad_value)) 32 data = data.map(operations=ops.PadEnd(pad_shape))
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/opencl/kernel/ |
D | pad.cc | 67 auto pad_shape = in_tensors_.at(1)->shape(); in CheckSpecs() local 68 if (pad_shape.size() != DIMENSION_2D || pad_shape[0] != in_ndim || pad_shape[1] != DIMENSION_2D) { in CheckSpecs()
|
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/kernels/data/ |
D | pad_end_op.h | 30 explicit PadEndOp(const TensorShape &pad_shape, const std::shared_ptr<Tensor> &pad_value) in PadEndOp() argument 31 : output_shape_(pad_shape), pad_val_(pad_value) {} in PadEndOp()
|
D | data_utils.cc | 376 … std::shared_ptr<Tensor> &src, std::shared_ptr<Tensor> *dst, const std::vector<dsize_t> &pad_shape, in PadEnd() argument 380 return PadEndNumeric(src, dst, pad_shape, 0); in PadEnd() 382 return PadEndString(src, dst, pad_shape, ""); in PadEnd() 394 return PadEndNumeric(src, dst, pad_shape, val); in PadEnd() 398 return PadEndString(src, dst, pad_shape, std::string(val)); in PadEnd() 402 const std::vector<dsize_t> &pad_shape, float pad_val) { in PadEndNumeric() argument 404 if (src->Rank() == 0 || src->shape().AsVector() == pad_shape) { in PadEndNumeric() 407 CHECK_FAIL_RETURN_UNEXPECTED(src->Rank() == pad_shape.size(), in PadEndNumeric() 409 ", and rank of pad value: " + std::to_string(pad_shape.size())); in PadEndNumeric() 410 RETURN_IF_NOT_OK(Tensor::CreateEmpty(TensorShape(pad_shape), src->type(), dst)); in PadEndNumeric() [all …]
|
D | data_utils.h | 81 … std::shared_ptr<Tensor> &src, std::shared_ptr<Tensor> *dst, const std::vector<dsize_t> &pad_shape, 91 const std::vector<dsize_t> &pad_shape, float pad_val); 112 const std::vector<dsize_t> &pad_shape, const std::string &pad_val);
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/hccl/ |
D | hccl_kernel_metadata.cc | 51 auto pad_shape = trans::PaddingShapeTo4dDefault(input_shape); in GetKernelFormat() local 52 if (pad_shape[N_nchw] % kCubeSize != 0 || pad_shape[C_nchw] % kCubeSize != 0) { in GetKernelFormat()
|
/third_party/mindspore/mindspore/dataset/transforms/ |
D | c_transforms.py | 310 def __init__(self, pad_shape, pad_value=None): argument 311 self.pad_shape = cde.TensorShape(pad_shape) 315 return cde.PadEndOperation(self.pad_shape, self.pad_value)
|
D | validators.py | 165 [pad_shape, pad_value], _ = parse_user_args(method, *args, **kwargs) 169 type_check(pad_shape, (list,), "pad_shape") 171 for dim in pad_shape:
|
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/api/ |
D | transforms.cc | 163 explicit Data(const std::vector<dsize_t> &pad_shape, const MSTensor &pad_value) in Data() 164 : pad_shape_(pad_shape), pad_value_(pad_value) {} in Data() 169 PadEnd::PadEnd(const std::vector<dsize_t> &pad_shape, const MSTensor &pad_value) in PadEnd() argument 170 : data_(std::make_shared<Data>(pad_shape, pad_value)) {} in PadEnd()
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/graph_kernel/ |
D | insert_pad.cc | 150 const vec &pad_shape, const vec &tail_shape) { in InsertPad() argument 166 (void)abs_shape.insert(abs_shape.begin(), pad_shape.begin(), pad_shape.end()); in InsertPad()
|
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/kernels/ir/ |
D | bindings.cc | 139 .def(py::init([](TensorShape pad_shape, const std::shared_ptr<Tensor> &pad_value) { in __anon360f34601002() argument 140 auto pad_end = std::make_shared<transforms::PadEndOperation>(pad_shape, pad_value); in __anon360f34601002()
|
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/kernels/ir/data/ |
D | transforms_ir.cc | 192 PadEndOperation::PadEndOperation(const TensorShape &pad_shape, const std::shared_ptr<Tensor> &pad_v… in PadEndOperation() argument 193 : pad_shape_(pad_shape), pad_value_(pad_value) {} in PadEndOperation()
|
D | transforms_ir.h | 159 explicit PadEndOperation(const TensorShape &pad_shape, const std::shared_ptr<Tensor> &pad_value);
|
/third_party/mindspore/mindspore/numpy/ |
D | array_creations.py | 2369 pad_shape = pad_tensor.shape 2370 if not pad_shape: 2372 elif pad_shape == (1,): 2374 elif pad_shape == (2,): 2376 elif pad_shape == (1, 2): 2378 elif pad_shape == (ndim, 2):
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/ |
D | ascend_helper.cc | 293 …ShapeVector pad_shape = trans::PaddingShape(out_shape, AnfAlgo::GetOutputFormat(input, 0), padding… in NewTransOpNode() local 297 pad_shape_ptr = std::make_shared<abstract::Shape>(pad_shape, pad_shape_min, pad_shape_max); in NewTransOpNode() 299 pad_shape_ptr = std::make_shared<abstract::Shape>(pad_shape); in NewTransOpNode()
|
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/include/dataset/ |
D | transforms.h | 271 explicit PadEnd(const std::vector<dsize_t> &pad_shape, const MSTensor &pad_value = {});
|