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

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.

主站蜘蛛池模板: 灵川县| 兴化市| 腾冲县| 简阳市| 瑞金市| 杨浦区| 塘沽区| 西峡县| 古交市| 三亚市| 博白县| 师宗县| 宿松县| 湘乡市| 海淀区| 呼玛县| 开阳县| 旅游| 凌云县| 绥宁县| 那坡县| 会同县| 微博| 康保县| 北安市| 宜黄县| 祁东县| 长汀县| 东阿县| 莲花县| 义马市| 青浦区| 绿春县| 鸡西市| 阿图什市| 得荣县| 南昌县| 罗平县| 安远县| 台东市| 凭祥市|