dataset: Delete minddata/dataset/include/tensor.h; codedex fixes

pull/13008/head
Cathy Wong 4 years ago
parent 23f8e193fd
commit 24b991bae7

@ -21,7 +21,7 @@
#include "minddata/dataset/core/device_resource.h" #include "minddata/dataset/core/device_resource.h"
#include "minddata/dataset/core/device_tensor.h" #include "minddata/dataset/core/device_tensor.h"
#include "minddata/dataset/core/tensor_row.h" #include "minddata/dataset/core/tensor_row.h"
#include "minddata/dataset/include/tensor.h" #include "minddata/dataset/core/tensor.h"
#include "minddata/dataset/include/type_id.h" #include "minddata/dataset/include/type_id.h"
#include "minddata/dataset/kernels/ir/tensor_operation.h" #include "minddata/dataset/kernels/ir/tensor_operation.h"
#include "minddata/dataset/kernels/tensor_op.h" #include "minddata/dataset/kernels/tensor_op.h"

@ -35,9 +35,10 @@ struct Compose::Data {
}; };
Compose::Compose(const std::vector<TensorTransform *> &transforms) : data_(std::make_shared<Data>()) { Compose::Compose(const std::vector<TensorTransform *> &transforms) : data_(std::make_shared<Data>()) {
(void)std::transform( (void)std::transform(transforms.begin(), transforms.end(), std::back_inserter(data_->transforms_),
transforms.begin(), transforms.end(), std::back_inserter(data_->transforms_), [](TensorTransform *const op) -> std::shared_ptr<TensorOperation> {
[](TensorTransform *op) -> std::shared_ptr<TensorOperation> { return op != nullptr ? op->Parse() : nullptr; }); return op != nullptr ? op->Parse() : nullptr;
});
} }
Compose::Compose(const std::vector<std::shared_ptr<TensorTransform>> &transforms) : data_(std::make_shared<Data>()) { Compose::Compose(const std::vector<std::shared_ptr<TensorTransform>> &transforms) : data_(std::make_shared<Data>()) {
@ -78,9 +79,10 @@ struct RandomApply::Data {
RandomApply::RandomApply(const std::vector<TensorTransform *> &transforms, double prob) RandomApply::RandomApply(const std::vector<TensorTransform *> &transforms, double prob)
: data_(std::make_shared<Data>()) { : data_(std::make_shared<Data>()) {
(void)std::transform( (void)std::transform(transforms.begin(), transforms.end(), std::back_inserter(data_->transforms_),
transforms.begin(), transforms.end(), std::back_inserter(data_->transforms_), [](TensorTransform *const op) -> std::shared_ptr<TensorOperation> {
[](TensorTransform *op) -> std::shared_ptr<TensorOperation> { return op != nullptr ? op->Parse() : nullptr; }); return op != nullptr ? op->Parse() : nullptr;
});
data_->prob_ = prob; data_->prob_ = prob;
} }
@ -110,9 +112,10 @@ struct RandomChoice::Data {
}; };
RandomChoice::RandomChoice(const std::vector<TensorTransform *> &transforms) : data_(std::make_shared<Data>()) { RandomChoice::RandomChoice(const std::vector<TensorTransform *> &transforms) : data_(std::make_shared<Data>()) {
(void)std::transform( (void)std::transform(transforms.begin(), transforms.end(), std::back_inserter(data_->transforms_),
transforms.begin(), transforms.end(), std::back_inserter(data_->transforms_), [](TensorTransform *const op) -> std::shared_ptr<TensorOperation> {
[](TensorTransform *op) -> std::shared_ptr<TensorOperation> { return op != nullptr ? op->Parse() : nullptr; }); return op != nullptr ? op->Parse() : nullptr;
});
} }
RandomChoice::RandomChoice(const std::vector<std::shared_ptr<TensorTransform>> &transforms) RandomChoice::RandomChoice(const std::vector<std::shared_ptr<TensorTransform>> &transforms)

@ -813,7 +813,7 @@ UniformAugment::UniformAugment(const std::vector<TensorTransform *> &transforms,
: data_(std::make_shared<Data>()) { : data_(std::make_shared<Data>()) {
(void)std::transform( (void)std::transform(
transforms.begin(), transforms.end(), std::back_inserter(data_->transforms_), transforms.begin(), transforms.end(), std::back_inserter(data_->transforms_),
[](TensorTransform *op) -> std::shared_ptr<TensorOperation> { return op ? op->Parse() : nullptr; }); [](TensorTransform *const op) -> std::shared_ptr<TensorOperation> { return op ? op->Parse() : nullptr; });
data_->num_ops_ = num_ops; data_->num_ops_ = num_ops;
} }

@ -22,7 +22,7 @@
#include "include/api/status.h" #include "include/api/status.h"
#include "include/api/types.h" #include "include/api/types.h"
#include "mindspore/core/ir/api_tensor_impl.h" #include "mindspore/core/ir/api_tensor_impl.h"
#include "minddata/dataset/include/tensor.h" #include "minddata/dataset/core/tensor.h"
namespace mindspore { namespace mindspore {
namespace dataset { namespace dataset {

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save