/third_party/mindspore/tests/st/ops/cpu/ |
D | test_shift_op.py | 40 def __infer__(self, x, fill_value): argument 61 def construct(self, x, fill_value): argument 62 return self.shift(x, fill_value) 65 def numpy_shift(array: np.ndarray, periods: int, axis: int, fill_value=np.nan) -> np.ndarray: argument 87 result[tuple(fill_indices)] = fill_value 93 def compare(arr: np.ndarray, periods: int, axis: int, fill_value=np.nan): argument 94 numpy_result = numpy_shift(arr, periods=periods, axis=axis, fill_value=fill_value) 96 mindspore_result = shift(Tensor(arr), fill_value=fill_value).asnumpy() 115 def test_no_shift(fill_value, dtype, axis): argument 117 compare(arr, axis=axis, periods=0, fill_value=fill_value) [all …]
|
/third_party/mindspore/mindspore/dataset/vision/ |
D | c_transforms.py | 661 def __init__(self, padding, fill_value=0, padding_mode=Border.CONSTANT): argument 663 if isinstance(fill_value, int): 664 fill_value = tuple([fill_value] * 3) 666 self.fill_value = fill_value 670 return cde.PadOperation(self.padding, self.fill_value, DE_C_BORDER_TYPE[self.padding_mode]) 737 …nit__(self, degrees, translate=None, scale=None, shear=None, resample=Inter.NEAREST, fill_value=0): argument 751 if isinstance(fill_value, numbers.Number): 752 fill_value = (fill_value, fill_value, fill_value) 771 self.fill_value = fill_value 775 self.fill_value) [all …]
|
D | py_transforms.py | 407 …def __init__(self, size, padding=None, pad_if_needed=False, fill_value=0, padding_mode=Border.CONS… argument 415 self.fill_value = fill_value 429 self.fill_value, self.padding_mode) 740 def __init__(self, degrees, resample=Inter.NEAREST, expand=False, center=None, fill_value=0): argument 745 self.fill_value = fill_value 757 …n util.random_rotation(img, self.degrees, self.resample, self.expand, self.center, self.fill_value) 959 def __init__(self, padding, fill_value=0, padding_mode=Border.CONSTANT): argument 963 self.fill_value = fill_value 977 return util.pad(img, self.padding, self.fill_value, self.padding_mode) 1248 …nit__(self, degrees, translate=None, scale=None, shear=None, resample=Inter.NEAREST, fill_value=0): argument [all …]
|
D | validators.py | 119 def check_fill_value(fill_value): argument 120 if isinstance(fill_value, int): 121 check_uint8(fill_value) 122 elif isinstance(fill_value, tuple) and len(fill_value) == 3: 123 for value in fill_value: 393 …[size, padding, pad_if_needed, fill_value, padding_mode], _ = parse_user_args(method, *args, **kwa… 398 if fill_value is not None: 399 check_fill_value(fill_value) 424 def check_resample_expand_center_fill_value_params(resample, expand, center, fill_value): argument 432 check_fill_value(fill_value) [all …]
|
D | py_transforms_util.py | 400 def random_crop(img, size, padding, pad_if_needed, fill_value, padding_mode): argument 456 img = pad(img, padding, fill_value, padding_mode) 459 img = pad(img, (size[1] - img.size[0], 0), fill_value, padding_mode) 462 img = pad(img, (0, size[0] - img.size[1]), fill_value, padding_mode) 588 def rotate(img, angle, resample, expand, center, fill_value): argument 615 if isinstance(fill_value, int): 616 fill_value = tuple([fill_value] * 3) 618 return img.rotate(angle, resample, expand, center, fillcolor=fill_value) 683 def random_rotation(img, degrees, resample, expand, center, fill_value): argument 723 return rotate(img, angle, resample, expand, center, fill_value) [all …]
|
/third_party/mindspore/mindspore/lite/src/runtime/kernel/opencl/kernel/ |
D | fill.cc | 36 cl_int4 fill_value = {}; in RunFill() local 37 fill_value.s[0] = fill_value.s[1] = fill_value.s[2] = fill_value.s[3] = default_; in RunFill() 47 …if (ocl_runtime_->GetDefaultCommandQueue()->enqueueFillImage(*out_image, fill_value, src_origin, r… in RunFill() 60 cl_int4 fill_value = {default_, default_, default_, default_}; in RunShape() local 65 fill_value.s[i] = reinterpret_cast<int *>(tensor_shape_data)[i]; in RunShape() 70 …if (ocl_runtime_->GetDefaultCommandQueue()->enqueueFillImage(*out_image, fill_value, src_origin, r… in RunShape()
|
D | sparse_to_dense.cc | 37 cl_float4 fill_value = {}; in InitOutputToDefault() local 38 fill_value.s[0] = fill_value.s[1] = fill_value.s[2] = fill_value.s[3] = default_; in InitOutputToDefault() 48 …if (ocl_runtime_->GetDefaultCommandQueue()->enqueueFillImage(*out_image, fill_value, src_origin, r… in InitOutputToDefault()
|
/third_party/boost/boost/gil/concepts/ |
D | image.hpp | 76 pixel_t fill_value; in constraints() local 80 Image image3(pt, fill_value, 1); in constraints() 83 image.recreate(pt, fill_value, 1); in constraints() 122 value_t fill_value; in constraints() local 125 Image im3(w,h,fill_value,1); in constraints() 128 image.recreate(w,h,fill_value,1); in constraints()
|
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/kernels/ir/vision/ |
D | random_affine_ir.cc | 40 const std::vector<uint8_t> &fill_value) in RandomAffineOperation() argument 46 fill_value_(fill_value) { in RandomAffineOperation() 141 std::vector<uint8_t> fill_value = {fill_value_[dimension_zero], fill_value_[dimension_zero], in Build() local 144 fill_value[dimension_one] = fill_value_[dimension_one]; in Build() 145 fill_value[dimension_two] = fill_value_[dimension_two]; in Build() 149 interpolation_, fill_value); in Build() 177 std::vector<uint8_t> fill_value = op_params["fill_value"]; in from_json() local 179 interpolation, fill_value); in from_json()
|
D | slice_patches_ir.cc | 27 uint8_t fill_value) in SlicePatchesOperation() argument 32 fill_value_(fill_value) {} in SlicePatchesOperation() 67 uint8_t fill_value = op_params["fill_value"]; in from_json() local 68 …n = std::make_shared<vision::SlicePatchesOperation>(num_height, num_width, slice_mode, fill_value); in from_json()
|
D | affine_ir.cc | 27 const std::vector<uint8_t> &fill_value) in AffineOperation() argument 33 fill_value_(fill_value) {} in AffineOperation() 101 std::vector<uint8_t> fill_value = op_params["fill_value"]; in from_json() local 102 …ake_shared<vision::AffineOperation>(degrees, translation, scale, shear, interpolation, fill_value); in from_json()
|
D | pad_ir.cc | 31 …peration::PadOperation(const std::vector<int32_t> &padding, const std::vector<uint8_t> &fill_value, in PadOperation() argument 33 : padding_(padding), fill_value_(fill_value), padding_mode_(padding_mode) {} in PadOperation() 113 std::vector<uint8_t> fill_value = op_params["fill_value"]; in from_json() local 115 *operation = std::make_shared<vision::PadOperation>(padding, fill_value, padding_mode); in from_json()
|
D | rotate_ir.cc | 34 … const std::vector<float> ¢er, const std::vector<uint8_t> &fill_value) in RotateOperation() argument 40 fill_value_(fill_value) {} in RotateOperation() 116 std::vector<uint8_t> fill_value = op_params["fill_value"]; in from_json() local 117 …eration = std::make_shared<vision::RotateOperation>(degrees, resample, expand, center, fill_value); in from_json()
|
D | random_crop_with_bbox_ir.cc | 33 const std::vector<uint8_t> &fill_value, in RandomCropWithBBoxOperation() argument 39 fill_value_(fill_value), in RandomCropWithBBoxOperation() 138 std::vector<uint8_t> fill_value = op_params["fill_value"]; in from_json() local 141 …std::make_shared<vision::RandomCropWithBBoxOperation>(size, padding, pad_if_needed, fill_value, pa… in from_json()
|
D | random_crop_ir.cc | 31 bool pad_if_needed, const std::vector<uint8_t> &fill_value, in RandomCropOperation() argument 37 fill_value_(fill_value), in RandomCropOperation() 137 std::vector<uint8_t> fill_value = op_params["fill_value"]; in from_json() local 139 …::make_shared<vision::RandomCropOperation>(size, padding, pad_if_needed, fill_value, padding_mode); in from_json()
|
D | random_rotation_ir.cc | 40 const std::vector<uint8_t> &fill_value) in RandomRotationOperation() argument 46 fill_value_(fill_value) {} in RandomRotationOperation() 140 std::vector<uint8_t> fill_value = op_params["fill_value"]; in from_json() local 141 …= std::make_shared<vision::RandomRotationOperation>(degrees, resample, expand, center, fill_value); in from_json()
|
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/api/ |
D | vision.cc | 98 InterpolationMode interpolation, const std::vector<uint8_t> &fill_value) in Data() 104 fill_value_(fill_value) {} in Data() 114 InterpolationMode interpolation, const std::vector<uint8_t> &fill_value) in Affine() argument 115 … : data_(std::make_shared<Data>(degrees, translation, scale, shear, interpolation, fill_value)) {} in Affine() 437 …Data(const std::vector<int32_t> &padding, const std::vector<uint8_t> &fill_value, BorderType paddi… in Data() 438 : padding_(padding), fill_value_(fill_value), padding_mode_(padding_mode) {} in Data() 444 Pad::Pad(std::vector<int32_t> padding, std::vector<uint8_t> fill_value, BorderType padding_mode) in Pad() argument 445 : data_(std::make_shared<Data>(padding, fill_value, padding_mode)) {} in Pad() 456 InterpolationMode interpolation, const std::vector<uint8_t> &fill_value) in Data() 462 fill_value_(fill_value) {} in Data() [all …]
|
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/ |
D | shift_cpu_kernel.cc | 71 const auto fill_value = reinterpret_cast<T *>(inputs[1]->addr)[0]; in Launch() local 94 (void)std::fill_n(output, outer_size * axis_size * inner_size, fill_value); in Launch() 111 (void)std::fill_n(output + fill_begin_, fill_size_, fill_value); in Launch() 119 (void)tasks.emplace_back([this, i, fill_value, axis_size, inner_size, input, output, outputs] { in Launch() 130 (void)std::fill_n(output + fill_offset, fill_size_ * inner_size, fill_value); in Launch()
|
/third_party/mindspore/tests/ut/python/dataset/ |
D | test_slice_patches.py | 67 def slice_to_patches(ori_size, num_h, num_w, pad_or_drop, fill_value=0, plot=False): argument 79 num_h, num_w, mode.SliceMode.PAD, fill_value) 92 slice_patches, num_h=num_h, num_w=num_w, pad_or_drop=pad_or_drop, fill_value=fill_value) 192 def slice_patches(image, num_h, num_w, pad_or_drop, fill_value): argument 208 img = np.full([patch_h*num_h, patch_w*num_w, C], fill_value, dtype=np.uint8)
|
/third_party/mindspore/tests/ut/cpp/dataset/ |
D | deserialize_test.cc | 100 std::vector<uint8_t> fill_value = {20, 20, 20}; in TEST_F() local 109 …std::make_shared<vision::AffineOperation>(0.0, translation, 0.5, shear, interpolation, fill_value); in TEST_F() 121 std::make_shared<vision::PadOperation>(padding, fill_value, BorderType::kConstant); in TEST_F() 157 std::vector<uint8_t> fill_value = {150, 150, 150}; in TEST_F() local 169 degrees, InterpolationMode::kNearestNeighbour, true, center, fill_value); in TEST_F() 171 degrees, translate_range, scale_range, shear_ranges, interpolation, fill_value); in TEST_F() 176 …std::make_shared<vision::RandomCropWithBBoxOperation>(size, padding, true, fill_value, BorderType:… in TEST_F() 187 …td::make_shared<vision::RandomRotationOperation>(degrees, interpolation, true, center, fill_value); in TEST_F() 231 std::vector<uint8_t> fill_value = {4, 4, 4}; in TEST_F() local 234 …std::make_shared<vision::RandomCropOperation>(size, padding, pad_if_needed, fill_value, BorderType… in TEST_F() [all …]
|
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/kernels/ir/image/ |
D | bindings.cc | 267 … .def(py::init([](const std::vector<int32_t> &padding, const std::vector<uint8_t> &fill_value, in __anon682838b22402() 269 … auto pad = std::make_shared<vision::PadOperation>(padding, fill_value, padding_mode); in __anon682838b22402() 281 InterpolationMode interpolation, const std::vector<uint8_t> &fill_value) { in __anon682838b22602() argument 283 … shear_ranges, interpolation, fill_value); in __anon682838b22602() 331 const std::vector<uint8_t> &fill_value, BorderType padding_mode) { in __anon682838b22e02() argument 333 …std::make_shared<vision::RandomCropOperation>(size, padding, pad_if_needed, fill_value, padding_mo… in __anon682838b22e02() 345 … bool pad_if_needed, const std::vector<uint8_t> &fill_value, BorderType padding_mode) { in __anon682838b23002() argument 347 size, padding, pad_if_needed, fill_value, padding_mode); in __anon682838b23002() 439 std::vector<float> center, std::vector<uint8_t> fill_value) { in __anon682838b24002() argument 441 degrees, interpolation_mode, expand, center, fill_value); in __anon682838b24002() [all …]
|
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/kernels/data/ |
D | fill_op.h | 31 explicit FillOp(std::shared_ptr<Tensor> fill_value) : fill_value_(fill_value) {} in FillOp() argument
|
/third_party/gstreamer/gstplugins_bad/tests/check/elements/ |
D | videoframe-audiolevel.c | 39 static guint channels, fill_value; variable 56 fill_value = 1; in set_default_params() 99 fail_unless_equals_int (b, fill_value); in output_achain() 229 gst_buffer_memset (buf, 0, fill_value, channels * buf_size); in push_abuffers() 478 fill_value = 0; in GST_START_TEST() 489 fill_value = 0; in GST_START_TEST() 500 fill_value = 0; in GST_START_TEST() 511 fill_value = 0; in GST_START_TEST()
|
/third_party/mindspore/mindspore/numpy/ |
D | array_creations.py | 331 def full(shape, fill_value, dtype=None): argument 361 if not isinstance(fill_value, ARRAY_TYPES): 362 …raise_type_error("fill value should be int, float, bool, list, tuple, Tensor, but got", fill_value) 366 if isinstance(fill_value, (int, float, bool)): 367 dtype = _get_dtype_from_scalar(fill_value) 368 if isinstance(fill_value, Tensor): 369 dtype = fill_value.dtype 372 if isinstance(fill_value, (int, float, bool)): 373 return F.fill(dtype, shape, fill_value) 374 if isinstance(fill_value, (list, tuple)): [all …]
|
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/kernels/ir/ |
D | validators.cc | 46 Status ValidateVectorFillvalue(const std::string &op_name, const std::vector<uint8_t> &fill_value) { in ValidateVectorFillvalue() argument 47 if (fill_value.empty() || (fill_value.size() != 1 && fill_value.size() != 3)) { in ValidateVectorFillvalue() 49 … ": fill_value expecting size 1 or 3, got fill_value.size(): " + std::to_string(fill_value.size()); in ValidateVectorFillvalue()
|