diff --git a/code/test.py b/code/test.py index d1eedb5a..5cb13c89 100644 --- a/code/test.py +++ b/code/test.py @@ -77,9 +77,9 @@ def speed(): # 580 for the GPU. OS=Fedora 14, gcc=4.5.1, python/BLAS from EPD # 7.1-2 (python 2.7.2, mkl unknow). BLAS with only 1 thread. - expected_times_64 = numpy.asarray([10.0, 22.5, 76.1, 73.7, 116.4, + expected_times_64 = numpy.asarray([9.8, 22.5, 76.1, 73.7, 116.4, 346.9, 381.9, 558.1, 186.3]) - expected_times_32 = numpy.asarray([11.6, 29.6, 42.5, 66.5, 71, + expected_times_32 = numpy.asarray([8.1, 17.9, 42.5, 66.5, 71, 191.2, 226.8, 432.8, 176.2]) # Number with just 1 decimal are new value that are faster with @@ -219,6 +219,7 @@ def do_tests(): print >> sys.stderr, 'gpu % expected/get', ( expected_times_gpu / gpu_times) + print if do_float64 and do_float32: print >> sys.stderr, 'float64/float32', ( float64_times / float32_times) @@ -239,6 +240,7 @@ def compare(x, y): # time and the real time, we consider this an error. return sum((ratio < 0.95) + (ratio > 1.05)) + print if do_float64: err = compare(expected_times_64, float64_times) print >> sys.stderr, 'speed_failure_float64=' + str(err) diff --git a/doc/lenet.txt b/doc/lenet.txt index a4eb86fa..3035115a 100644 --- a/doc/lenet.txt +++ b/doc/lenet.txt @@ -139,10 +139,10 @@ feature map :math:`h^k` is obtained as follows (for :math:`tanh` non-linearities .. Note:: Recall the following definition of convolution for a 1D signal. - :math:`o[n] = f[n]*g[n] = \sum_{u=-\infty}^{\infty} f[u] g[u-n] = \sum_{u=-\infty}^{\infty} f[n-u] g[u]`. + :math:`o[n] = f[n]*g[n] = \sum_{u=-\infty}^{\infty} f[u] g[n-u] = \sum_{u=-\infty}^{\infty} f[n-u] g[u]`. This can be extended to 2D as follows: - :math:`o[m,n] = f[m,n]*g[m,n] = \sum_{u=-\infty}^{\infty} \sum_{v=-\infty}^{\infty} f[u,v] g[u-m,v-n]`. + :math:`o[m,n] = f[m,n]*g[m,n] = \sum_{u=-\infty}^{\infty} \sum_{v=-\infty}^{\infty} f[u,v] g[m-u,n-v]`. To form a richer representation of the data, hidden layers are composed of a set of multiple feature maps, :math:`\{h^{(k)}, k=0..K\}`.