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

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.

主站蜘蛛池模板: 平潭县| 会昌县| 宝清县| 扶绥县| 香格里拉县| 类乌齐县| 梁河县| 肃宁县| 隆林| 宁河县| 慈溪市| 吉木乃县| 巩留县| 谢通门县| 威海市| 迁安市| 西畴县| 磐安县| 怀集县| 革吉县| 芦溪县| 施秉县| 广元市| 夏津县| 邢台县| 杭州市| 彩票| 海门市| 江油市| 兰西县| 介休市| 赤水市| 荣昌县| 镇原县| 佛学| 疏附县| 青岛市| 江永县| 鄂伦春自治旗| 宁德市| 平山县|