I came across this statement from CNTK 103A:
gzfname, h = urlretrieve(src, './delete.me')
I understand all the rest but that gzfname, h = ......
What exactly is the purpose of h
, is it a filehead thing?
Code:
def load_or_download_mnist_files(filename, num_samples, local_data_dir):
gzfname, h = urlretrieve(src, './delete.me')
if (local_data_dir):
local_path = os.path.join(local_data_dir, filename)
else:
local_path = os.path.join(os.getcwd(), filename)
if os.path.exists(local_path):
gzfname = local_path
else:
local_data_dir = os.path.dirname(local_path)
if not os.path.exists(local_data_dir):
os.makedirs(local_data_dir)
filename = "http://yann.lecun.com/exdb/mnist/" + filename
print ("Downloading from" + filename, end=" ")
gzfname, h = urlretrieve(filename, local_path)
print ("[Done]")
return gzfname