Hi all,
I am trying to run the example of cifar10_cnn.py, however it is very very slow. This is a GPU from GeForce GTX 780 as the debug message shows, but I think it is still too slow. What could be wrong and how should I debug it? Thanks!
################
Log output
Using gpu device 0: GeForce GTX 780
X_train shape: (50000, 3, 32, 32)
50000 train samples
10000 test samples
Using real time data augmentation
----------------------------------------
Epoch 0
----------------------------------------
Training...
50000/50000 [==============================] - 274s - train loss: 1.5861
Testing...
10000/10000 [==============================] - 25s - test loss: 1.2306
----------------------------------------
Epoch 1
----------------------------------------
Training...
50000/50000 [==============================] - 272s - train loss: 1.2637
Testing...
10000/10000 [==============================] - 25s - test loss: 1.1018
----------------------------------------
Epoch 2
----------------------------------------
Training...
50000/50000 [==============================] - 275s - train loss: 1.1315
Testing...
10000/10000 [==============================] - 25s - test loss: 0.9809
----------------------------------------
Epoch 3
----------------------------------------
Training...
50000/50000 [==============================] - 274s - train loss: 1.0477
Testing...
10000/10000 [==============================] - 25s - test loss: 0.9126
....
CTRL+C quitted here
########
There is a slight change in source code as I am compiled against numpy 1.11.0.dev0+e4d4b45, there is a strict check now applied to type conversion of numpy.ndarray, so I added these extra two lines. See git diff:
$ git diff
diff --git a/examples/cifar10_cnn.py b/examples/cifar10_cnn.py
index b495248..dfb1743 100644
--- a/examples/cifar10_cnn.py
+++ b/examples/cifar10_cnn.py
@@ -93,6 +93,9 @@ else:
horizontal_flip=True, # randomly flip images
vertical_flip=False) # randomly flip images
+ X_train = X_train.astype("float32")
+ X_test = X_test.astype("float32")
+
# compute quantities required for featurewise normalization
# (std, mean, and principal components if ZCA whitening is applied)
datagen.fit(X_train)