Skip to content

Commit 30565d3

Browse files
committed
update load flickr
1 parent 147db84 commit 30565d3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tensorlayer/files.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,10 @@ def load_flickr25k_dataset(tag='sky', path="data/flickr25k", n_threads=50, print
519519
520520
Examples
521521
-----------
522+
- Get images with tag of sky
522523
>>> images = tl.files.load_flickr25k_dataset(tag='sky')
524+
- Get all images
525+
>>> images = tl.files.load_flickr25k_dataset(tag=None, n_threads=100, printable=True)
523526
"""
524527
filename = 'mirflickr25k.zip'
525528
url = 'http://press.liacs.nl/mirflickr/mirflickr25k/'
@@ -551,9 +554,10 @@ def load_flickr25k_dataset(tag='sky', path="data/flickr25k", n_threads=50, print
551554
if tag is None or tag in tags:
552555
images_list.append(path_imgs[idx])
553556

554-
images = visualize.read_images(images_list, folder_imgs, n_threads=50, printable=False)
557+
images = visualize.read_images(images_list, folder_imgs, n_threads=n_threads, printable=printable)
555558
return images
556559

560+
557561
## Load and save network
558562
def save_npz(save_list=[], name='model.npz', sess=None):
559563
"""Input parameters and the file name, save parameters into .npz file. Use tl.utils.load_npz() to restore.
@@ -772,6 +776,7 @@ def load_and_assign_npz(sess=None, name=None, network=None):
772776
print("[*] Load {} SUCCESS!".format(name))
773777
return network
774778

779+
775780
## Load and save variables
776781
def save_any_to_npy(save_dict={}, name='file.npy'):
777782
"""Save variables to .npy file.

0 commit comments

Comments
 (0)