input_data.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:IntroToDeepLearning 作者: robb-brown 项目源码 文件源码
def maybe_download(filename, work_directory):
  """Download the data from Yann's website, unless it's already here."""
  if not os.path.exists(work_directory):
    os.mkdir(work_directory)
  filepath = os.path.join(work_directory, filename)
  if not os.path.exists(filepath):
    filepath, _ = urllib.request.urlretrieve(SOURCE_URL + filename, filepath)
    statinfo = os.stat(filepath)
    print('Succesfully downloaded', filename, statinfo.st_size, 'bytes.')
  return filepath
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号