Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions, especially multidimensional arrays. The use of Theano can be achieved when processing large data and pure C operation speed. It can surpass the CPU running on C by leveraging the advantages of multiple GPU.
。。。
Theano optimizations include but are not limited to: using GPU to compute constant analysis merging similar graphs, avoiding redundant computational arithmetic simplifying inserting effective BLAS operations using memory aliasing avoiding computation using inplace operation Loop Fusion
a glimpse of the fast
Here is an example of how to use Theano, although not all of its features, but it details how to use Theano:
Import Theano from
Theano import tensor
# Declare two symbolic floating-point scalars
a = tensor.dscalar ()
b = Tensor.dscalar ()
# Create a simple expression
c = A + b
# Convert the expression into a callable object That takes (a,b)
# values as input and computes a value for C
f = theano.function ([a,b], C)
# bind 1.5 to ' a ' , 2.5 to ' B ', and evaluate ' C '
assert 4.0 = f (1.5, 2.5)