Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions code/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions doc/lenet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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\}`.
Expand Down