Skip to content

Instantly share code, notes, and snippets.

@tengpeng
Created April 10, 2016 01:12
Show Gist options
  • Select an option

  • Save tengpeng/ed8d74bb7d62bfaab8e274ff76b42a16 to your computer and use it in GitHub Desktop.

Select an option

Save tengpeng/ed8d74bb7d62bfaab8e274ff76b42a16 to your computer and use it in GitHub Desktop.
get full path
import os
data_root = '/home/pt/Dropbox/mxnet/example/yelp/'
def load_info():
full_path = []
for path, dir, files in os.walk(data_root+'/train_photos'):
for f in files:
#path_to_image.append(f)
#dir.append(f)
name = os.path.join(dir, f)
full_path.append(name)
return full_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment