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

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.

主站蜘蛛池模板: 岑巩县| 永胜县| 遂川县| 青川县| 无极县| 玉环县| 河间市| 集安市| 萝北县| 安新县| 皋兰县| 古浪县| 蓝田县| 怀宁县| 海淀区| 株洲市| 湘西| 砀山县| 景宁| 兴山县| 穆棱市| 贵港市| 丰宁| 义马市| 福海县| 阿尔山市| 德昌县| 浮山县| 荥经县| 宣化县| 江华| 泰宁县| 溆浦县| 景洪市| 巩留县| 泽库县| 乌海市| 吉安市| 屏南县| 博白县| 罗定市|