by benjaminPKP · 9y ago · 0 comments
Two conv layers (6 and 12 feature maps, 5x5 filters), one fully connected layer (120 neurons), activation=Tanh, pooltype: average (excluding padding), cost=Negative Log Likelihood.
Learning rate=0.20, minibatch size=100, dropout = 0.0, L2 lambda=0.0, momentum=0.0, initialization: normal
Training for 10 epochs:
CPU: 172 sec, GPU: 14 sec.
When decreasing batch size to 20 images, the numbers are: CPU: 318 sec, GPU: 38 sec.
So yeah, the CPU code your professors wrote was really crappy.
I'd be betting that someone with low level optimization expertise (comparable to what you appear to have done with the GPU) could get at least another 10x out of the CPU version. You are completely right that GPU's have the potential for great increases over the current normal, but there's also (typically) room for large improvement on modern CPU's as well.
Lets see it then. Most cpu programs have enormous amounts of fat left in them from cache misses and poor or no use of SIMD.