From 349319e5ed9c2ddb0af5a6fb66280c6b7b3bb552 Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Tue, 28 Feb 2017 20:02:32 +0000 Subject: [PATCH] Add imdb_test.py --- python/paddle/v2/dataset/tests/imdb_test.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/paddle/v2/dataset/tests/imdb_test.py b/python/paddle/v2/dataset/tests/imdb_test.py index fafaf414044..5cfb6203e78 100644 --- a/python/paddle/v2/dataset/tests/imdb_test.py +++ b/python/paddle/v2/dataset/tests/imdb_test.py @@ -1,6 +1,12 @@ import paddle.v2.dataset.common +import tarfile URL = 'http://ai.stanford.edu/%7Eamaas/data/sentiment/aclImdb_v1.tar.gz' MD5 = '7c2ac02c03563afcf9b574c7e56c153a' -paddle.v2.dataset.common.download +tarf = tarfile.open(paddle.v2.dataset.common.download(URL, 'imdb', MD5)) + +tf = tarf.next() +while tf != None: + print tf.name + tf = tarf.next() -- GitLab