"Deep learning and Theano" Theano the first experience of learning

Source: Internet
Author: User
Tags theano

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.