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

  • Hands-On Neural Networks
  • Leonardo De Marchi Laura Mitchell
  • 436字
  • 2021-06-24 14:00:09

Environment setup

There are only a few viable programming language options when creating ML software. The most popular ones are Python and R, but Scala is also quite popular. There are other languages, but the better ones in terms of use in ML are Julia, JavaScript, Java, and a few others. In this book, we will be using Python only. The motivation behind this choice is its widespread adoption, its simplicity of use, and the vast ecosystem of libraries that are possible to use.

In particular, we will be using Python 3.7 and a few of its following libraries:

  • numpy: For fast vectorized numerical computation
  • scipy: Built on top of numpy, with many mathematical functionalities
  • pandas: For data manipulation 
  • scikit-learn: The main Python library for ML
  • tensorflow: The engine that powers our deep learning algorithms
  • keras: The library we are going to use to develop our deep learning algorithms, which sits on top of TensorFlow

Let's focus on the last two libraries for the moment. There are a few libraries that are useful nowadays for Neural Networks (NNs). The most widespread is TensorFlow. It is a symbolic math library that uses a directed graph to model the dataflow between operations.

It's particularly suitable for matrix multiplications as it can use all the power of the GPU's architecture, composed by many, but not particularly powerful, cores that can execute many operations simultaneously. TensorFlow is also quite versatile as it works on a few different platforms; it's possible to run models on mobile devices using TensorFlow Lite and even on a browser using TensorFlow.js (https://www.tensorflow.org/js).

One of the libraries we are going to use for most of this book will be Keras. It is a layer that sits on the top of libraries such as TensorFlow to provide a more abstract interface to the end users. In this regard, Keras is narrower than TensorFlow as it focuses on neural networks, but it's also more generic as it can be used in conjunction with TensorFlow's alternatives such as the Microsoft Cognitive Toolkit.

Now, these libraries don't guarantee backward compatibility. Because of this, when working with Python, it's good practice to work in virtual environments. This allows us to isolate the different projects we are working on, but also to distribute our setup to different machines in an easy way and to avoid compatibility issues.

There are a few ways we can create these environments; in this book, we will cover the following:

  • Virtual environment
  • Anaconda
  • Docker

We will go through each one of them to show how they work and explain their advantages and disadvantages. 

主站蜘蛛池模板: 霸州市| 黑龙江省| 五原县| 晋江市| 饶河县| 蓬安县| 苗栗市| 容城县| 开阳县| 安岳县| 珠海市| 上蔡县| 南乐县| 鞍山市| 工布江达县| 酒泉市| 公主岭市| 德保县| 石渠县| 平潭县| 沈丘县| 玉田县| 老河口市| 虞城县| 逊克县| 洞头县| 商洛市| 屏山县| 太白县| 娱乐| 贺兰县| 黄梅县| 乐都县| 定兴县| 益阳市| 肃宁县| 宝兴县| 张掖市| 林州市| 桑日县| 循化|