48
48
from . import _logging as logging
49
49
from . import nlp , utils , visualize
50
50
51
+ __all__ = [
52
+ 'load_mnist_dataset' ,
53
+ 'load_fashion_mnist_dataset' ,
54
+ 'load_cifar10_dataset' ,
55
+ 'load_ptb_dataset' ,
56
+ 'load_matt_mahoney_text8_dataset' ,
57
+ 'load_imdb_dataset' ,
58
+ 'load_nietzsche_dataset' ,
59
+ 'load_wmt_en_fr_dataset' ,
60
+ 'load_flickr25k_dataset' ,
61
+ 'load_flickr1M_dataset' ,
62
+ 'load_cyclegan_dataset' ,
63
+ 'download_file_from_google_drive' ,
64
+ 'load_celebA_dataset' ,
65
+ 'load_voc_dataset' ,
66
+ 'save_npz' ,
67
+ 'load_npz' ,
68
+ 'assign_params' ,
69
+ 'load_and_assign_npz' ,
70
+ 'save_npz_dict' ,
71
+ 'load_and_assign_npz_dict' ,
72
+ 'save_ckpt' ,
73
+ 'load_ckpt' ,
74
+ 'save_any_to_npy' ,
75
+ 'load_npy_to_any' ,
76
+ 'file_exists' ,
77
+ 'folder_exists' ,
78
+ 'del_file' ,
79
+ 'del_folder' ,
80
+ 'read_file' ,
81
+ 'load_file_list' ,
82
+ 'load_folder_list' ,
83
+ 'exists_or_mkdir' ,
84
+ 'maybe_download_and_extract' ,
85
+ 'natural_keys' ,
86
+ 'npz_to_W_pdf' ,
87
+ ]
88
+
51
89
52
90
## Load dataset functions
53
91
def load_mnist_dataset (shape = (- 1 , 784 ), path = 'data' ):
54
92
"""Load the original mnist.
55
-
93
+
56
94
Automatically download MNIST dataset and return the training, validation and test set with 50000, 10000 and 10000 digit images respectively.
57
95
58
96
Parameters
@@ -61,7 +99,7 @@ def load_mnist_dataset(shape=(-1, 784), path='data'):
61
99
The shape of digit images (the default is (-1, 784), alternatively (-1, 28, 28, 1)).
62
100
path : str
63
101
The path that the data is downloaded to.
64
-
102
+
65
103
Returns
66
104
-------
67
105
X_train, y_train, X_val, y_val, X_test, y_test: tuple
@@ -77,7 +115,7 @@ def load_mnist_dataset(shape=(-1, 784), path='data'):
77
115
78
116
def load_fashion_mnist_dataset (shape = (- 1 , 784 ), path = 'data' ):
79
117
"""Load the fashion mnist.
80
-
118
+
81
119
Automatically download fashion-MNIST dataset and return the training, validation and test set with 50000, 10000 and 10000 fashion images respectively, `examples <http://marubon-ds.blogspot.co.uk/2017/09/fashion-mnist-exploring.html>`__.
82
120
83
121
Parameters
@@ -86,7 +124,7 @@ def load_fashion_mnist_dataset(shape=(-1, 784), path='data'):
86
124
The shape of digit images (the default is (-1, 784), alternatively (-1, 28, 28, 1)).
87
125
path : str
88
126
The path that the data is downloaded to.
89
-
127
+
90
128
Returns
91
129
-------
92
130
X_train, y_train, X_val, y_val, X_test, y_test: tuple
@@ -102,7 +140,7 @@ def load_fashion_mnist_dataset(shape=(-1, 784), path='data'):
102
140
103
141
def _load_mnist_dataset (shape , path , name = 'mnist' , url = 'http://yann.lecun.com/exdb/mnist/' ):
104
142
"""A generic function to load mnist-like dataset.
105
-
143
+
106
144
Parameters:
107
145
----------
108
146
shape : tuple
0 commit comments