tensorflow_serving/example/mnist_input_data.py
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('Successfully downloaded %s %d bytes.' % (filename, statinfo.st_size))
  return filepath
Download the data from Yann's website, unless it's already here.
Download the data from Yann's website, unless it's already here.
Download the data from Yann ' s website unless it ' s already here .
def maybe_download(filename, work_directory):
  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('Successfully downloaded %s %d bytes.' % (filename, statinfo.st_size))
  return filepath
def maybe_download ( filename , work_directory ) : 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 ( 'Successfully downloaded %s %d bytes.' % ( filename , statinfo . st_size ) ) return filepath
Download the data from Yann's website, unless it's already here.
Download the data from Yann ' s website unless it ' s already here .
"""Download the data from Yann's website, unless it's already here."""
filename
work_directory