|
|
|
@ -32,7 +32,7 @@ TEST_F(MindDataTestPipeline, TestAutoContrastSuccess1) {
|
|
|
|
|
|
|
|
|
|
// Create an ImageFolder Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testPK/data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, RandomSampler(false, 5));
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, std::make_shared<RandomSampler>(false, 5));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Repeat operation on ds
|
|
|
|
@ -81,7 +81,7 @@ TEST_F(MindDataTestPipeline, TestAutoContrastSuccess2) {
|
|
|
|
|
|
|
|
|
|
// Create an ImageFolder Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testPK/data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, RandomSampler(false, 5));
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, std::make_shared<RandomSampler>(false, 5));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Repeat operation on ds
|
|
|
|
@ -142,7 +142,7 @@ TEST_F(MindDataTestPipeline, TestCenterCrop) {
|
|
|
|
|
|
|
|
|
|
// Create an ImageFolder Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testPK/data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, RandomSampler(false, 5));
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, std::make_shared<RandomSampler>(false, 5));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Repeat operation on ds
|
|
|
|
@ -228,7 +228,7 @@ TEST_F(MindDataTestPipeline, TestCutMixBatchSuccess1) {
|
|
|
|
|
// Create a Cifar10 Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testCifar10Data/";
|
|
|
|
|
int number_of_classes = 10;
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create objects for the tensor ops
|
|
|
|
@ -299,7 +299,7 @@ TEST_F(MindDataTestPipeline, TestCutMixBatchSuccess2) {
|
|
|
|
|
// Create a Cifar10 Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testCifar10Data/";
|
|
|
|
|
int number_of_classes = 10;
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Batch operation on ds
|
|
|
|
@ -358,7 +358,7 @@ TEST_F(MindDataTestPipeline, TestCutMixBatchFail1) {
|
|
|
|
|
|
|
|
|
|
// Create a Cifar10 Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testCifar10Data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Batch operation on ds
|
|
|
|
@ -393,7 +393,7 @@ TEST_F(MindDataTestPipeline, TestCutMixBatchFail2) {
|
|
|
|
|
|
|
|
|
|
// Create a Cifar10 Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testCifar10Data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Batch operation on ds
|
|
|
|
@ -428,7 +428,7 @@ TEST_F(MindDataTestPipeline, TestCutMixBatchFail3) {
|
|
|
|
|
|
|
|
|
|
// Create a Cifar10 Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testCifar10Data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Batch operation on ds
|
|
|
|
@ -462,7 +462,7 @@ TEST_F(MindDataTestPipeline, TestCutMixBatchFail4) {
|
|
|
|
|
MS_LOG(INFO) << "Doing MindDataTestPipeline-TestCutMixBatchFail4 with invalid greater than 1 prob parameter.";
|
|
|
|
|
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testCifar10Data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Batch operation on ds
|
|
|
|
@ -521,7 +521,7 @@ TEST_F(MindDataTestPipeline, TestCutOut) {
|
|
|
|
|
|
|
|
|
|
// Create an ImageFolder Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testPK/data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Repeat operation on ds
|
|
|
|
@ -573,7 +573,7 @@ TEST_F(MindDataTestPipeline, TestDecode) {
|
|
|
|
|
|
|
|
|
|
// Create an ImageFolder Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testPK/data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, false, RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, false, std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Repeat operation on ds
|
|
|
|
@ -620,7 +620,7 @@ TEST_F(MindDataTestPipeline, TestHwcToChw) {
|
|
|
|
|
|
|
|
|
|
// Create an ImageFolder Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testPK/data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Repeat operation on ds
|
|
|
|
@ -672,7 +672,7 @@ TEST_F(MindDataTestPipeline, TestInvert) {
|
|
|
|
|
|
|
|
|
|
// Create an ImageFolder Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testPK/data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, RandomSampler(false, 20));
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, std::make_shared<RandomSampler>(false, 20));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create objects for the tensor ops
|
|
|
|
@ -710,7 +710,7 @@ TEST_F(MindDataTestPipeline, TestMixUpBatchFail1) {
|
|
|
|
|
// FIXME: For error tests, need to check for failure from CreateIterator execution
|
|
|
|
|
// Create a Cifar10 Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testCifar10Data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Batch operation on ds
|
|
|
|
@ -744,7 +744,7 @@ TEST_F(MindDataTestPipeline, TestMixUpBatchFail2) {
|
|
|
|
|
// FIXME: For error tests, need to check for failure from CreateIterator execution
|
|
|
|
|
// Create a Cifar10 Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testCifar10Data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Batch operation on ds
|
|
|
|
@ -778,7 +778,7 @@ TEST_F(MindDataTestPipeline, TestMixUpBatchSuccess1) {
|
|
|
|
|
|
|
|
|
|
// Create a Cifar10 Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testCifar10Data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Batch operation on ds
|
|
|
|
@ -829,7 +829,7 @@ TEST_F(MindDataTestPipeline, TestMixUpBatchSuccess2) {
|
|
|
|
|
|
|
|
|
|
// Create a Cifar10 Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testCifar10Data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = Cifar10(folder_path, "all", std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Batch operation on ds
|
|
|
|
@ -880,7 +880,7 @@ TEST_F(MindDataTestPipeline, TestNormalize) {
|
|
|
|
|
|
|
|
|
|
// Create an ImageFolder Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testPK/data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Repeat operation on ds
|
|
|
|
@ -958,7 +958,7 @@ TEST_F(MindDataTestPipeline, TestNormalizePad) {
|
|
|
|
|
|
|
|
|
|
// Create an ImageFolder Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testPK/data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Repeat operation on ds
|
|
|
|
@ -1025,7 +1025,7 @@ TEST_F(MindDataTestPipeline, TestPad) {
|
|
|
|
|
|
|
|
|
|
// Create an ImageFolder Dataset
|
|
|
|
|
std::string folder_path = datasets_root_path_ + "/testPK/data/";
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, RandomSampler(false, 10));
|
|
|
|
|
std::shared_ptr<Dataset> ds = ImageFolder(folder_path, true, std::make_shared<RandomSampler>(false, 10));
|
|
|
|
|
EXPECT_NE(ds, nullptr);
|
|
|
|
|
|
|
|
|
|
// Create a Repeat operation on ds
|
|
|
|
|