This article has participated in the activity of “New person creation Ceremony”, and started the road of digging gold creation together.

Deep learning development environment configuration and simple case sharing

[imG-TWUe7HGQ-1606036724162] [AI-ML-dl-jpg]

Machine learning is a method to achieve artificial intelligence, and deep learning is a technology to achieve machine learning

Machine “learning” is the process of making predictions by learning the internal logic of data from previous experience and applying the learned logic to new data.

I. Selection and configuration of deep learning development platform

1. Operating system

  • windows
  • linux
  • macOS

2. Computer environment configuration

  • Install the graphics card driver
    nvidia-smi
    Copy the code
  • Install CUDA and CUDNN

    Install a version that matches your computer's graphics card driver and the framework the code usesCopy the code

CUDA is a parallel computing framework developed by NVIDIA for their gpus, meaning that CUDA can only run on NVIDIA gpus, and only when the computing problem to be solved can be massively parallel

Cudnn is a GPU acceleration library for deep neural networks developed by NVIDIA

#! nvidia-smi! nvcc -VCopy the code
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Sun_Nov_19_03:10:15_CST_2017
Cuda compilation tools, release 9.0, V9.0.252
Copy the code

252

2. Development tool selection

1. Conda installation and common commands are introduced

  • Conda is an open source package management system and environment management system for installing multiple versions of software packages and their dependencies and switching between them easily.
  • It works on multiple platforms.
  • Conda is included in all versions of Anaconda and Miniconda.

The installation

Qinghua Garden image download address

Common operationslink

  1. View the existing environment
conda info --envs
Copy the code

or

conda env list
Copy the code
  1. Create a new environment
Conda create -n env_name python=3.6 # conda create -n env_name numpy matplotlib python=3.6Copy the code
  1. Deleting an Existing Environment
conda remove -n env_name --all
Copy the code
  1. Context switching
# Linux /Mac activate activate conda activate #Windows activate deactivate env_nameCopy the code
  1. View the installed package
Conda list # specifies to view the package conda list -n env_name installed in an environmentCopy the code
  1. Install the package using Conda
conda install numpy
Copy the code
  1. Uninstall the package
conda remove numpy 
Copy the code
  1. To find the package
conda search  numpy
Copy the code
  1. Update package
conda update numpy
Copy the code
pip install xxx 
Copy the code

2. jupyter notebook

Jupyter Notebook can be seen in many deep learning tutorials, and as a WEB interactive environment, it’s very convenient to do demos and write samples.

The Jupyter Notebook is opened in the form of a web page. You can directly write and run codes on the web page, and the running results of codes are displayed under the code block. If you need to write a description document during the programming process, you can write it directly on the same page for timely explanation and explanation.

3.pycharm

PyCharm is a Python IDE that comes with a full set of tools to help users improve their productivity while developing in Python, such as debugging, syntax highlighting, Project management, code jumps, smart hints, autocomplete, unit testing, and version control. In addition, the IDE provides advanced functionality to support professional Web development within the Django framework.

[img-14yXUxqZ-1606036724165] (pycharm.png)

[img- xfhyyoit-1606036724167)(pycharm-1.png)]

#! CD ~ / configs/pycharm - community - 2020.1.4 / bin /
#! Sh ~ / configs/pycharm - community - 2020.1.4 / bin/pycharm. Sh
Copy the code
Copy the code

Data annotation tools

The commonly used data annotation tools are: Labelme, Labelimg, etc.

4. Target detection cases

Iris classification

AI know bug

PaddleHub mask testing

My PP-YOLO practice

Copy the code