What is the difference between AI inference and training? do you know?

WBOY
Release: 2024-03-26 14:40:15
forward
787 people have browsed it

If I want to sum up the difference between AI training and reasoning in one sentence, I think it is most appropriate to use "one minute on stage, ten years of hard work off stage".

Xiao Ming has been dating the goddess he has long admired for many years, and he has quite a lot of experience in asking her out, but he is still confused about the mystery.

With the help of AI technology, can accurate predictions be achieved?

Xiao Ming thought over and over again and summarized the variables that may affect whether the goddess accepts the invitation: whether it is a holiday, the weather is bad, too hot/too cold, in a bad mood, sick, etc. He has an appointment, relatives come to the house...etc.

What is the difference between AI inference and training? do you know?Picture

We weight and sum these variables. If it is greater than a certain threshold, the goddess will definitely accept the invitation. So, how much weight do these variables have, and what are the thresholds?

This is a very complex problem that is difficult to solve accurately through simple methods. Therefore, Xiao Ming plans to conduct research using deep neural networks and apply them to large amounts of accumulated data for training, so that the artificial intelligence model can learn the patterns on its own.

What is the difference between AI inference and training? do you know?Picture

Xiao Ming’s biggest advantage is that he has rich data accumulation. So he organized and accurately listed all the variables and mapped them exactly to whether the offer was successful or not. This practice is called "data annotation".

What is the difference between AI inference and training? do you know?Picture

Once you have the data, feed it to the AI. AI reads each set of data, evaluates it using the initial default weights, and then obtains the results of its own analysis. This process is called "forward propagation".

Then, check whether the AI results are correct.

Here you need to introduce a "loss function" to calculate the difference between the result and the correct answer. If the result is not ideal, it will go back to optimize and adjust the weights, and obtain the results again for evaluation. This process is called "back propagation".

After inspection, it was found that the evaluation results and the correct answers are one step closer. After many rounds of iterations, the correct answer is gradually approached by adjusting parameter weights. This process is called "gradient descent".

What is the difference between AI inference and training? do you know?Picture

After many rounds of in-depth baptism of known data, the accuracy of AI evaluation is already quite high. So Xiao Ming ended the training, fixed the parameter weights, trimmed off the redundant parameters whose weights were not activated, and declared to enter the next stage.

It’s time to test the results of the hard work done some time ago!

What is the difference between AI inference and training? do you know?Picture

So, Xiao Ming chose a good and auspicious day to prepare all the new parameters and input them into the AI. The AI quickly gave its own assessment conclusion: the goddess will accept the invitation!

The above process is called "reasoning".

Xiao Ming took a shower and changed clothes, tidied up carefully, booked movie tickets, and carefully asked the goddess for her opinion. Sure enough, the goddess agreed!

From then on, before each invitation, Xiao Ming would devoutly ask the AI to predict whether it would be successful. It turns out that AI can get it right most of the time. We can say that the "generalization" effect of AI is very good.

What is the difference between AI inference and training? do you know?Picture

#To sum up, the so-called AI training is the process of letting the neural network learn new capabilities from existing data. .

This process is very complicated, just like receiving nine years of compulsory education since childhood. It involves the close cooperation of schools, books, teachers and other factors. The data throughput is large, it is intensive calculation, and it costs a lot of money. Time training is very necessary.

The so-called AI reasoning is to input new data to the trained AI and let it solve new problems of the same type.

This is like a student graduating from college, leaving school, books, and teachers, and using the knowledge learned to independently deal with new problems. The data throughput is relatively small, but he needs to be on call at any time. Give answers quickly and well.

The AI applications we generally come into contact with are APPs trained by service providers. We propose various tasks above, and the background responds quickly and gives answers in seconds. These all belong to AI reasoning.

Mastering AI well will allow us to work with ease and get twice the result with half the effort.

The above is the detailed content of What is the difference between AI inference and training? do you know?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:51cto.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!