Concepts that need to be mastered before learning deep learning, common commands of anaconda, environment configuration, installation of python third-party libraries, installation of deep learning framework

deep learning

The relationship between artificial intelligence, machine learning, and deep learning

Among them, artificial intelligence includes machine learning and deep learning, machine learning includes deep learning, and deep learning can be divided into speech recognition, natural language processing, computer vision and other fields.

artificial intelligence definition

Simulate and interpret human intelligence with modern technology to extend the discipline of human intelligence.

machine learning definition

Machine learning is dedicated to the study of how to use experience to improve the performance of the system itself through computational means. This experience is usually what we call data, so machine learning is to generate a model (that is, an algorithm) by learning these data. With this model, we can generate a prediction value for new data. The main tasks of machine learning are classification, regression, clustering, anomaly detection, density estimation, etc.

Deep Learning Definition

The process of machine learning generally starts with data preprocessing, feature extraction, feature selection, and then prediction or reasoning. The preprocessing and feature extraction feature selection is also called feature expression, which plays a vital role in predicting results, and these need to be operated by humans. This introduces deep learning, which automatically extracts features through neural networks, does not have human subjectivity, retains the objectivity of data, and can extract more accurate features. The networks included in its deep learning mainly include fully connected neural networks, convolutional neural networks, recurrent neural networks, and transformers.

Deep Learning Framework

Now the main popular frameworks are tensorflow, keras, pytorch, MxNet

deep learning tools

Mainly by configuring the python environment. If your project requires multiple versions, that is, if you need more than one version of python, you can manage your python environment by installing anaconda. I think anaconda is a very good software package Management system and environment management system, through which the required third-party libraries can be installed. For the python compiler, you can use jupyter, pycharm, VScode, each with its own advantages. As long as anaconda is installed, the compiler is also installed, which is more convenient. The anaconda download address is Anaconda | The World's Most Popular Data Science Platform . You can download it yourself. You can download it through Baidu. This download is relatively simple, so I won't say more.

Anaconda commonly used commands

environment creation

Open the Anaconda Prompt command line window, the interface is as follows:

To create an environment, enter: conda create -n environment name python = the python version number you want to install

例如:conda create --name your_env_name python=python2.7

It means that I want to create an environment, the name is your_env_name, the python environment I configured in this environment is python2.7, and the system will automatically download python2.7.

The results of the download are as follows:

context switching

After we create an environment, we can switch from the current base environment to the environment we created

The environment switching statement is: conda activate your_env_name 

The result is as follows, the opening brackets of the command line show the name of our current environment

 When wanting to exit the current environment, we can enter: conda deactivate to return to the base environment

As shown below:

 Third-party libraries required for installation in the environment

After switching to the current environment, we can install the python library or framework we need in the current library.

For example, to install the numpy library, we can enter: conda install numpy

To update the numpy library, we can type: conda updata numpy

To uninstall the numpy library, we can enter: conda remove numpy

Viewing the libraries in the current environment can also be used to verify that the libraries we installed were successfully installed. We can enter: conda list

As shown below:

Summary: When we install, delete or update a certain library, we only need to replace the numpy above me with the name of the library you are operating

environment delete

We can first check which environments we have created, enter the command: conda info --envs

The result is as follows:

 

 If we want to delete an environment, we can enter the command: conda remove --name your_env_name

Install the deep learning framework

We can install the tensorflow framework in the current environment by entering the following command

Instruction: pip install --upgrade --ignore-installed tensorflow

Just wait for the installation. It should be noted that the versions of tensorflow and python seem to be related. If there is a problem, see if it is because of a version mismatch.

Open the compiler jupyter

You can enter the following command in the current environment: jupyter notebook to open the web interface.

Guess you like

Origin blog.csdn.net/BaoITcore/article/details/124606745