【DL_sharing】Deep learning development environment configuration and simple case sharing

This article has participated in the "Newcomer Creation Ceremony" event to start the road of gold creation together.

Deep learning development environment configuration and simple case sharing

[External link image transfer failed, the source site may have an anti-leech mechanism, it is recommended to save the image and upload it directly (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

The "learning" of a machine is a process of learning the logic inside the data through past experience, that is, data, and applying the learned logic to new data to make predictions.

1. Selection and configuration of deep learning development platform

1. Operating System

  • windows
  • linux
  • macOS

2. Computer environment configuration

  • Install graphics driver
    nvidia-smi
    复制代码
  • Install CUDA and cudnn

      安装与自己电脑显卡驱动匹配,以及代码所使用框架相对应的版本
    复制代码

CUDA is a parallel computing framework launched by NVIDIA for its own GPU, which means that CUDA can only run on NVIDIA's GPU, and CUDA can only play its role when the computing problem to be solved is a large number of parallel computing.

cudnn is an acceleration library for deep neural networks created by NVIDIA. It is a GPU acceleration library for deep neural networks.

#!nvidia-smi
!nvcc -V
复制代码
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
复制代码

252

2. Selection of development tools

1. Introduction to conda installation and common commands

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

Install

Tsinghua Garden mirror download address

Common Actions Links

  1. View the current existing environment
conda info --envs
复制代码

or

conda env list
复制代码
  1. Create a new environment
conda create -n env_name python=3.6
# 同时安装必要的包
conda create -n env_name numpy matplotlib python=3.6
复制代码
  1. delete existing environment
conda remove -n env_name --all
复制代码
  1. environment switch
# linux/Mac下需要使用
#source activate env_name
conda activate env_name
#Windows下使用
activate env_name
#退出环境
deactivate env_name
复制代码
  1. View installed packages
conda list
# 指定查看某环境下安装的package
conda list -n env_name
复制代码
  1. Install the package using conda
conda install numpy
复制代码
  1. uninstall package
conda remove numpy 
复制代码
  1. find package
conda search  numpy
复制代码
  1. update package
conda update numpy
复制代码
pip install xxx 
复制代码

2. jupyter notebook

In many deep learning tutorials, we can see Jupyter notebook, as a WEB interactive environment, it is very convenient to make demonstrations and write samples.

Jupyter Notebook是以网页的形式打开,可以在网页页面中直接编写代码和运行代码,代码的运行结果也会直接在代码块下显示。如在编程过程中需要编写说明文档,可在同一个页面中直接编写,便于作及时的说明和解释。

3.pycharm

PyCharm是一种Python IDE,带有一整套可以帮助用户在使用Python语言开发时提高其效率的工具,比如调试、语法高亮、Project管理、代码跳转、智能提示、自动完成、单元测试、版本控制。此外,该IDE提供了一些高级功能,以用于支持Django框架下的专业Web开发。

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(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
复制代码
复制代码

三、 数据标注工具

常用的数据标注工具有:labelme、labelimg等。

四、目标检测案例

鸢尾花分类

AI识虫

PaddleHub 口罩检测

我的PP-YOLO实战演练

复制代码

Guess you like

Origin juejin.im/post/7080451032806850597