(gzfile, url)
| 46 | return traindata, trainlabel, validdata, validlabel, testdata, testlabel |
| 47 | |
| 48 | def download_data(gzfile, url): |
| 49 | if os.path.exists(gzfile): |
| 50 | print('Downloaded already!') |
| 51 | sys.exit(0) |
| 52 | print('Downloading data %s' % (url)) |
| 53 | ul_request.urlretrieve(url, gzfile) |
| 54 | print('Finished!') |
| 55 | |
| 56 | def show_images(filepath): |
| 57 | with open(filepath, 'rb') as f: |