When I look at articles on artificial intelligence, I often see the word "** learning times **".
Every article is explained in difficult language, so it's hard to understand! I think many people thought that.
This time, I will explain the "number of learning times" in an easy-to-understand manner.
See the image below. This is the number of learnings.
I will explain one by one.
For example, you are now trying to create an artificial intelligence (AI) that separates images of dogs and cats. We prepared 3,000 images of dogs and 3,000 images of cats, for a total of 6,000 images.
We will show these 6,000 images to AI to help them remember the characteristics of dogs and cats. However, AI cannot be smart just by "seeing 6,000 sheets once". This is the same as not being able to remember what the teacher said in class at once.
So, I try to remember it by looking at 6,000 sheets over and over again. Simply put, this "how many times you have seen (remembered)" is the number of times you have learned.
If you see 6,000 images 3 times, you will learn 3 times. (18,000 in total) If you look at 6,000 images 5 times, you will learn 5 times. (Total 30,000 sheets) If you see 6,000 images 100 times, you will learn 100 times. (6,000,000 in total)
The more you learn, the smarter your AI will be. The first time (the first 6,000 images) was "I don't know if it's a dog or a cat ...", but when I showed it twice or three times, "I didn't know it before, but now I know! I will become smarter with the feeling.
The basics are like this, but in reality you are learning in a slightly different way. A few years ago, some great man thought of "a more efficient and smarter way". That's how to use "batch size".
To remember more efficiently, we use the idea of batch size. For example, if the batch size = 600, it will look like this:
Divide 6,000 images into groups of 600 each. At this time, "600" is the ** batch size **. Since 6,000 sheets are divided into 600 sheets, a total of 10 groups can be created. AI will learn for each group.
There is a point to note here. The images to be grouped are not selected in order from the first image, but are selected from 6,000 images as "** random **".
Choose 600 from 6,000 → Group 1 Choose 600 from 6,000 → Group 2 Choose 600 from 6,000 → Group 3
Make 10 groups like this. At this time, it is not necessary to decide how many dogs and how many cats. Make a group of 600 sheets each.
Some of you may have wondered, "If you do that and select randomly, you will get images that are selected 2.3 times or images that are never selected."
That's right. It seems that flexible AI can be created by "selecting appropriately" in this way. (It's okay if you think about it)
Also, if you divide 6,000 sheets by batch size = 600, you can make a group of 10, and this "10" is called "** iteration **".
Iteration means "repeated" in Japanese. It is used in an atmosphere of "iteration 1, iteration 2, iteration 3", such as "1 time, 2 times, 3 times".
In other words, in this example, A 6,000 dataset was trained with batch size = 600 and iteration = 10. It will be like that.
By the way, programmers call the number of learnings the "epoch number". Epoch 3 for 3 learnings, 10 learning times is epoch 10, Epoch 100 for 100 learnings, It looks like.
The figure below summarizes the epoch, batch size, and iteration.
If you can understand this figure, you should be able to understand it even when the word "learning count" appears when you look at articles and papers on artificial intelligence!
** "AI for cat allergies" ** https://t.co/4ltE8gzBVv?amp=1 We publish about machine learning on YouTube. If you have time, please take a look.
created by NekoAllergy