!4796 Fix randomdata ut core dump problem

Merge pull request !4796 from xiefangqi/fix_randomdata_ut
This commit is contained in:
mindspore-ci-bot 2020-08-20 14:11:55 +08:00 committed by Gitee
commit 7b0a4e5929
1 changed files with 2 additions and 5 deletions

View File

@ -100,11 +100,8 @@ TEST_F(MindDataTestPipeline, TestRandomDatasetBasic2) {
// Check if RandomDataOp read correct columns
uint64_t i = 0;
while (row.size() != 0) {
auto image = row["image"];
auto label = row["label"];
MS_LOG(INFO) << "Tensor image shape: " << image->shape();
MS_LOG(INFO) << "Tensor label shape: " << label->shape();
// If no schema specified, RandomData will generate random columns
// So we don't check columns here
iter->GetNextRow(&row);
i++;
}