- Keras Deep Learning Cookbook
- Rajdeep Dua Manpreet Singh Ghotra
- 206字
- 2021-06-10 19:38:47
Installing numpy and scipy
The numpy and scipy packages are prerequisites for Theano installation. The following versions are recommended:
- NumPy >= 1.9.1 <= 1.12
- SciPy >= 0.14 < 0.17.1: Highly recommended for sparse matrix and support for special functions in Theano, SciPy >=0.8 would do the work
- BLAS installation (with Level 3 functionality) the recommended: MKL, this is free through conda with the mkl-service package
Basic Linear Algebra Subprograms ( BLAS) is a specification that defines a set of low-level routines for performing common linear algebra operations such as vector addition, scalar multiplication, dot products, linear combinations, and matrix multiplication. These are the de facto standard low-level routines for linear algebra libraries; the routines have bindings for both C and Fortran. Level 3 is referred to as matrix -to-matrix multiplications.
- Execute the following command to install numpy and scipy. (Make sure conda is in your PATH):
conda install numpy
conda install scipy
The output of the scipy installation is shown as follows. Notice that it installs libgfortran as part of the scipy installation:
Fetching package metadata ...........
Solving package specifications: .
Package plan for installation in environment /home/ubuntu/miniconda2:
- The following new packages will also be installed:
libgfortran-ng: 7.2.0-h9f7466a_2
scipy: 1.0.0-py27hf5f0f52_0
Proceed ([y]/n)?
libgfortran-ng 100% |#############################################################| Time: 0:00:00 36.60 MB/s
scipy-1.0.0-py 100% |#############################################################| Time: 0:00:00 66.62 MB/s