Skip to content

Commit cfea001

Browse files
SVHN
1 parent e38a0f3 commit cfea001

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,36 @@ from extra-keras-datasets import kmnist
120120

121121
---
122122

123+
### SVHN-Normal
124+
125+
```
126+
from extra-keras-datasets import svhn
127+
(input_train, target_train), (input_test, target_test) = svhn.load_data(type='normal')
128+
```
129+
130+
<a href="./assets/svhn-normal.png"><img src="./assets/svhn-normal.png" width="500" style="border: 3px solid #f6f8fa;" /></a>
131+
132+
---
133+
134+
### SVHN-Extra
135+
136+
```
137+
from extra-keras-datasets import svhn
138+
(input_train, target_train), (input_test, target_test) = svhn.load_data(type='extra')
139+
```
140+
141+
<a href="./assets/svhn-extra.png"><img src="./assets/svhn-extra.png" width="500" style="border: 3px solid #f6f8fa;" /></a>
142+
143+
---
144+
123145
## Contributors and other references
124146
* **EMNIST dataset:**
125147
* Cohen, G., Afshar, S., Tapson, J., & van Schaik, A. (2017). EMNIST: an extension of MNIST to handwritten letters. Retrieved from http://arxiv.org/abs/1702.05373
126148
* [tlindbloom](https://stackoverflow.com/users/4008755/tlindbloom) on StackOverflow: [loading EMNIST-letters dataset](https://stackoverflow.com/questions/51125969/loading-emnist-letters-dataset/53547262#53547262) in [emnist.py](./emnist.py).
127149
* **KMNIST dataset:**
128150
* Clanuwat, T., Bober-Irizar, M., Kitamoto, A., Lamb, A., Yamamoto, K., & Ha, D. (2018). Deep learning for classical Japanese literature. arXiv preprint arXiv:1812.01718. Retrieved from https://arxiv.org/abs/1812.01718
151+
* **SVHN dataset:**
152+
* Netzer, Y., Wang, T., Coates, A., Bissacco, A., Wu, B., & Ng, A. Y. (2011). Reading digits in natural images with unsupervised feature learning. Retrieved from http://ufldl.stanford.edu/housenumbers/nips2011_housenumbers.pdf / http://ufldl.stanford.edu/housenumbers/
129153

130154
## License
131155
The licenseable parts of this repository are licensed under a [MIT License](./LICENSE), so you're free to use this repo in your machine learning projects / blogs / exercises, and so on. Happy engineering! πŸš€

β€Žassets/svhn-extra.pngβ€Ž

241 KB
Loading

β€Žassets/svhn-normal.pngβ€Ž

240 KB
Loading

β€Žextra_keras_datasets/svhn.pyβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def load_data(path='svhn_matlab.npz', type='normal'):
5252
input_extra = mat_extra['X']
5353
input_extra = np.rollaxis(input_extra, 3, 0)
5454
target_extra = mat_extra['y'].flatten()
55-
input_train = np.insert(input_extra, len(input_train), values = input_train)
56-
target_train = np.concatenate(target_extra, target_train)
55+
input_train = np.concatenate((input_extra, input_train))
56+
target_train = np.concatenate((target_extra, target_train))
5757

5858
# Return data
5959
return (input_train, target_train), (input_test, target_test)

0 commit comments

Comments
Β (0)