Commit 840bca878eeb294463b0ba1c0646ea3148b6cf01
1 parent
25c0c9c9
Exists in
master
and in
1 other branch
find . -name '*.py' -o -name *.sh | xargs wc -l \n 11305 total.
Showing
2 changed files
with
3 additions
and
1 deletions
Show diff stats
mdata/ILSVRC.py
@@ -458,7 +458,8 @@ class DataILSVRC(DataDumperBase): | @@ -458,7 +458,8 @@ class DataILSVRC(DataDumperBase): | ||
458 | 458 | ||
459 | for tag, feat in dict_dataset.values(): | 459 | for tag, feat in dict_dataset.values(): |
460 | feat.ravel()[[i*304+j for i in range(0,304,8) for j in range(0,304,8)]] = 0 | 460 | feat.ravel()[[i*304+j for i in range(0,304,8) for j in range(0,304,8)]] = 0 |
461 | - X.append(feat.ravel()) | 461 | + feat = np.bitwise_and(feat,1) |
462 | + X.append(feat.ravel()) | ||
462 | Y.append(int(tag)) | 463 | Y.append(int(tag)) |
463 | 464 | ||
464 | else: | 465 | else: |
test/test_model.py
@@ -158,6 +158,7 @@ def test_THEANO_crop(): | @@ -158,6 +158,7 @@ def test_THEANO_crop(): | ||
158 | timer.mark() | 158 | timer.mark() |
159 | dilc = ILSVRC.DataILSVRC(base_dir='/data/hadoop/ImageNet/ILSVRC/ILSVRC2013_DET_val', category='Test_crop_pil') | 159 | dilc = ILSVRC.DataILSVRC(base_dir='/data/hadoop/ImageNet/ILSVRC/ILSVRC2013_DET_val', category='Test_crop_pil') |
160 | X, Y = dilc.load_data(mode='local', feattype='coef') | 160 | X, Y = dilc.load_data(mode='local', feattype='coef') |
161 | + print X[0],Y | ||
161 | timer.report() | 162 | timer.report() |
162 | 163 | ||
163 | # X_train, X_test, Y_train, Y_test = cross_validation.train_test_split(X, Y, test_size=0.2, random_state=0) | 164 | # X_train, X_test, Y_train, Y_test = cross_validation.train_test_split(X, Y, test_size=0.2, random_state=0) |