def maybe_download(filename, expected_bytes):
"""Download a file if not present, and make sure it's the right size."""
if not os.path.exists(filename):
filename, _ = urlretrieve(url + filename, filename)
statinfo = os.stat(filename)
if statinfo.st_size == expected_bytes:
print('Found and verified %s' % filename)
else:
print(statinfo.st_size)
raise Exception(
'Failed to verify ' + filename + '. Can you get to it with a browser?')
return filename
# filename = maybe_download('/users1/zyli/data/text8.zip', 31344016)
embed_bigram_lstm_one_char_label.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录