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

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.

主站蜘蛛池模板: 榆树市| 双峰县| 夏河县| 金秀| 辰溪县| 闽侯县| 新河县| 元谋县| 讷河市| 太白县| 金湖县| 商河县| 景宁| 宁明县| 阳原县| 峨眉山市| 大余县| 景洪市| 福海县| 南康市| 广饶县| 江永县| 安丘市| 剑阁县| 广汉市| 万山特区| 凯里市| 万山特区| 德江县| 陕西省| 卓尼县| 双柏县| 松阳县| 双鸭山市| 万载县| 丰县| 阿拉善右旗| 广昌县| 安多县| 舞钢市| 东乌珠穆沁旗|