官术网_书友最值得收藏!

Theano

Optimization and speed are two key factors to building a machine learning model. Theano is a Python package that optimizes implementations and gives you the ability to take advantage of the GPU. To install it, use the following command:

 pip install theano

To import all Theano modules, type:

>>> from theano import *

Here, we imported a sub-package called tensor:

>>> import theano.tensor as T

Let's suppose that we want to add two numbers:

>>> from theano import function
>>> a = T.dscalar('a')
>>> b = T.dscalar('b')
>>> c = a + b
>>> f = function([a, b], c)

The following are the full steps:

By now, we have acquired the fundamental skills to install and use the most common Python libraries used in machine learning projects. I assume that you have already installed all of the previous packages on your machine. In the subsequent chapters, we are going to use most of these packages to build fully working information security machine learning projects.

主站蜘蛛池模板: 满城县| 台南市| 新余市| 喀什市| 千阳县| 巴塘县| 怀化市| 凤凰县| 青浦区| 松江区| 拉萨市| 天门市| 伊宁市| 宜兴市| 许昌市| 精河县| 江山市| 益阳市| 西吉县| 元氏县| 福清市| 屏东市| 建宁县| 若尔盖县| 南开区| 公主岭市| 南丹县| 清原| 商河县| 蒙城县| 叙永县| 蒙城县| 汶上县| 惠州市| 宁德市| 苍南县| 吉林省| 商都县| 新乡县| 连城县| 霸州市|