通过使用多种深度学习库,可以发现,深度学习库普遍提供了以下功能来帮助我们更好的实现深度学习模型:
- 矩阵运算
- 性能优化以及使用GPU训练
- 自动微分
- 解决数值稳定问题
- 符号式编程(Theano、Tensorflow)
-定义计算流程;
-把计算流程编译成可执行的程序;
-给定输入,调用编译好的程序执行。
Theano
Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. ++Theano features++:
- tight integration with NumPy – Use numpy.ndarray in Theano-compiled functions.
- transparent use of a GPU– Perform data-intensive computations much faster than on a CPU.
- efficient symbolic differentiation – Theano does your derivatives for functions with one or many inputs.
- speed and stability optimizations – Get the right answer for log(1+x) even when x is really tiny.
- dynamic C code generation – Evaluate expressions faster.
- extensive unit-testing and self-verification – Detect and diagnose many types of errors.
What does it do that they don’t?
Theano is a Python library and optimizing compiler for manipulating and evaluating expressions, especially matrix-valued ones. Manipulation of matrices is typically done using the numpy package, so what does Theano do that Python and numpy do not?
- execution speed optimizations: Theano can use g++ or nvcc to compile parts your expression graph into CPU or GPU instructions, which run much faster than pure Python.
- symbolic differentiation: Theano can automatically build symbolic graphs for computing gradients.
- stability optimizations: Theano can recognize [some] numerically unstable expressions and compute them with more stable algorithms.
占位
- Tensorflow
- keras
- mxnet-gluon
本文介绍了深度学习库如Theano、Tensorflow等提供的关键功能,包括矩阵运算、自动微分、性能优化及GPU加速等,并详细阐述了Theano如何进行表达式定义、优化与评估,同时对比了其与Python和NumPy的不同之处。

被折叠的 条评论
为什么被折叠?



