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

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.

主站蜘蛛池模板: 新田县| 茂名市| 泗水县| 东乌珠穆沁旗| 乌鲁木齐市| 灵璧县| 社旗县| 长乐市| 万盛区| 正镶白旗| 遵化市| 广南县| 万载县| 双江| 高邮市| 聂荣县| 霍邱县| 兰溪市| 双流县| 前郭尔| 喀喇沁旗| 阿鲁科尔沁旗| 三门峡市| 东光县| 达拉特旗| 玛曲县| 米脂县| 鲁山县| 宁国市| 南川市| 博野县| 宜川县| 岳普湖县| 南岸区| 玛纳斯县| 景德镇市| 牡丹江市| 兰西县| 靖江市| 邛崃市| 三亚市|