Skip to content

Commit 23c7d83

Browse files
Add citation warning to STL10 dataset, #7
1 parent f4a7d5f commit 23c7d83

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

extra_keras_datasets/stl10.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,23 @@
1919
from scipy import io as sio
2020
import shutil
2121
import numpy as np
22+
import logging
23+
24+
25+
def warn_citation():
26+
"""Warns about citation requirements
27+
# Returns
28+
Void
29+
"""
30+
logging.warning(("Please cite the following paper when using or"
31+
" referencing this Extra Keras Dataset:"))
32+
logging.warning(
33+
("Coates, A., Ng, A., & Lee, H. (2011, June). An analysis of single-"
34+
"layer networks in unsupervised feature learning. In Proceedings of"
35+
" the fourteenth international conference on artificial "
36+
"intelligence and statistics (pp. 215-223).Retrieved from "
37+
"http://cs.stanford.edu/~acoates/papers/coatesleeng_aistats_2011.pdf")
38+
)
2239

2340

2441
def load_data(path="stl10_matlab.tar.gz"):
@@ -59,5 +76,8 @@ def load_data(path="stl10_matlab.tar.gz"):
5976
input_test = np.transpose(input_test, (0, 3, 2, 1))
6077
target_test = test["y"].flatten()
6178

79+
# Warn about citation
80+
warn_citation()
81+
6282
# Return data
6383
return (input_train, target_train), (input_test, target_test)

0 commit comments

Comments
 (0)