Browse Source

!4240 Add parameter information

Merge pull request !4240 from shenwei41/sw_master
tags/v0.7.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
dd9289a3c8
6 changed files with 15 additions and 2 deletions
  1. +2
    -2
      mindspore/ccsrc/minddata/dataset/engine/opt/pre/cache_transform_pass.cc
  2. +3
    -0
      mindspore/ccsrc/minddata/dataset/engine/opt/pre/epoch_injection_pass.h
  3. +3
    -0
      mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/soft_dvpp_decode_random_crop_resize_jpeg_op.h
  4. +3
    -0
      mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/soft_dvpp_decode_resize_jpeg_op.h
  5. +1
    -0
      mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/utils/soft_vpc.cc
  6. +3
    -0
      mindspore/dataset/transforms/vision/c_transforms.py

+ 2
- 2
mindspore/ccsrc/minddata/dataset/engine/opt/pre/cache_transform_pass.cc View File

@@ -79,8 +79,8 @@ Status CacheTransformPass::CachePass::RunOnNode(std::shared_ptr<CacheOp> node, b
MS_LOG(INFO) << "Cache transform pass: Set up cache sampler from non-mappable leaf.";
} else {
// We're a cache op but no sampler was saved from leaf, so create a default sampler
int64_t num_samples = 0;
int64_t start_index = 0;
const int64_t num_samples = 0;
const int64_t start_index = 0;
sampler_ = std::make_shared<SequentialSampler>(num_samples, start_index);
node->SetSampler(std::move(sampler_));
MS_LOG(INFO) << "Cache transform pass: Creating default sequential sampler for cache op.";


+ 3
- 0
mindspore/ccsrc/minddata/dataset/engine/opt/pre/epoch_injection_pass.h View File

@@ -78,6 +78,9 @@ class EpochInjectionPass : public TreePass {
/// \brief Constructor
EpochInjectionPass();

/// \brief Destructor
~EpochInjectionPass() = default;

/// \brief Runs an injection pass to inject in operators needed at the pre pass stage
/// \param[inout] tree The tree to operate on.
/// \param[inout] Indicate of the tree was modified.


+ 3
- 0
mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/soft_dvpp_decode_random_crop_resize_jpeg_op.h View File

@@ -34,6 +34,9 @@ class SoftDvppDecodeRandomCropResizeJpegOp : public RandomCropAndResizeOp {
float scale_ub = kDefScaleUb, float aspect_lb = kDefAspectLb,
float aspect_ub = kDefAspectUb, int32_t max_iter = kDefMaxIter);

/// \brief Destructor
~SoftDvppDecodeRandomCropResizeJpegOp() = default;

Status Compute(const std::shared_ptr<Tensor> &input, std::shared_ptr<Tensor> *output) override;

std::string Name() const override { return kSoftDvppDecodeRandomCropResizeJpegOp; }


+ 3
- 0
mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/soft_dvpp_decode_resize_jpeg_op.h View File

@@ -30,6 +30,9 @@ class SoftDvppDecodeResizeJpegOp : public TensorOp {
SoftDvppDecodeResizeJpegOp(int32_t target_height, int32_t target_width)
: target_height_(target_height), target_width_(target_width) {}

/// \brief Destructor
~SoftDvppDecodeResizeJpegOp() = default;

Status Compute(const std::shared_ptr<Tensor> &input, std::shared_ptr<Tensor> *output) override;

std::string Name() const override { return kSoftDvppDecodeReiszeJpegOp; }


+ 1
- 0
mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/utils/soft_vpc.cc View File

@@ -755,6 +755,7 @@ int32_t SoftVpc::Process(VpcInfo input, const SoftDpCropInfo crop, const VpcInfo
int32_t ret = CheckParamter();
if (ret != dpSucc) {
delete[] input.addr;
input.addr = nullptr;
return ret;
}


+ 3
- 0
mindspore/dataset/transforms/vision/c_transforms.py View File

@@ -132,6 +132,9 @@ class Invert(cde.InvertOp):
class Decode(cde.DecodeOp):
"""
Decode the input image in RGB mode.

Args:
rgb (bool, optional): Mode of decoding input image (default=True).
"""

def __init__(self, rgb=True):


Loading…
Cancel
Save