Python深度学习-环境

Python深度学习-环境 (Python Deep Learning - Environment)

In this chapter, we will learn about the environment set up for Python Deep Learning. We have to install the following software for making deep learning algorithms.

在本章中,我们将学习为Python深度学习设置的环境。 我们必须安装以下软件来进行深度学习算法。

  • Python 2.7+

    Python 2.7以上
  • Scipy with Numpy

    脾气暴躁的西皮
  • Matplotlib

    Matplotlib
  • Theano

    茶野
  • Keras

    凯拉斯
  • TensorFlow

    TensorFlow

It is strongly recommend that Python, NumPy, SciPy, and Matplotlib are installed through the Anaconda distribution. It comes with all of those packages.

强烈建议通过Anaconda发行版安装Python,NumPy,SciPy和Matplotlib。 它包含所有这些软件包。

We need to ensure that the different types of software are installed properly.

我们需要确保正确安装了不同类型的软件。

Let us go to our command line program and type in the following command −

让我们进入命令行程序并输入以下命令-


$ python
Python 3.6.3 |Anaconda custom (32-bit)| (default, Oct 13 2017, 14:21:34)
[GCC 7.2.0] on linux

Next, we can import the required libraries and print their versions −

接下来,我们可以导入所需的库并打印其版本-


import numpy
print numpy.__version__

输出量 (Output)


1.14.2

安装Theano,TensorFlow和Keras (Installation of Theano, TensorFlow and Keras)

Before we begin with the installation of the packages − Theano, TensorFlow and Keras, we need to confirm if the pip is installed. The package management system in Anaconda is called the pip.

在开始安装软件包-Theano,TensorFlow和Keras之前,我们需要确认是否已安装pip 。 Anaconda中的包裹管理系统称为pip。

To confirm the installation of pip, type the following in the command line −

要确认pip的安装,请在命令行中键入以下内容-


$ pip

Once the installation of pip is confirmed, we can install TensorFlow and Keras by executing the following command −

确认安装了pip后,我们可以通过执行以下命令来安装TensorFlow和Keras-


$pip install theano
$pip install tensorflow
$pip install keras

Confirm the installation of Theano by executing the following line of code −

通过执行以下代码行来确认Theano的安装-


$python –c “import theano: print (theano.__version__)”

输出量 (Output)


1.0.1

Confirm the installation of Tensorflow by executing the following line of code −

通过执行以下代码行来确认Tensorflow的安装-


$python –c “import tensorflow: print tensorflow.__version__”

输出量 (Output)


1.7.0

Confirm the installation of Keras by executing the following line of code −

通过执行以下代码行来确认Keras的安装-


$python –c “import keras: print keras.__version__”
Using TensorFlow backend

输出量 (Output)


2.1.5

翻译自: https://www.tutorialspoint.com/python_deep_learning/python_deep_learning_environment.htm

你可能感兴趣的:(tensorflow,python,深度学习,人工智能,anaconda)