Training your Machine Learning model - Google News Initiative Skip to main content menu close Resources expand_more EXPLORE BY GOAL Develop audiences Build audiences Increase traffic Engage visitors Digital journalism Digital reporting Storytelling formats Fight misinformation Grow revenue Create revenue models Reader revenue Digital ad revenue EXPLORE BY RESOURCE TYPE Products Trainings Case Studies View all resources Latest Resources Lesson Google Alerts: Stay in the know. Lesson Google Scholar: Access court cases, academic papers and sources. Lesson Advanced Search: Researching with precision. About expand_more Our purpose Impact report help search search close expand_more English (GB) English العربيّة Français Français (Canada) Deutsch हिंदी Bahasa Indonesia Italiano 한국어 日本語 Polski Português Português (Brazil) Español (LatAm) Español ภาษาไทย Türkçe 繁體中文 Tiếng việt My Account Sign In Resources keyboard_arrow_right About keyboard_arrow_right keyboard_arrow_left Resources View Resources EXPLORE BY GOAL Develop audiences keyboard_arrow_down Develop audiences Build audiences Increase traffic Engage visitors Digital journalism keyboard_arrow_down Digital journalism Digital reporting Storytelling formats Fight misinformation Grow revenue keyboard_arrow_down Grow revenue Create revenue models Reader revenue Digital ad revenue EXPLORE BY RESOURCE TYPE Products Trainings Case Studies View all resources keyboard_arrow_left About View About Our purpose Impact report My Account Sign In expand_more English (GB) English العربيّة Français Français (Canada) Deutsch हिंदी Bahasa Indonesia Italiano 한국어 日本語 Polski Português Português (Brazil) Español (LatAm) Español ภาษาไทย Türkçe 繁體中文 Tiếng việt Go to dashboard info info Get started Not sure where to start? Take a short quiz to get personalized recommendations. close 1 2 What's your goal today your can select more than one Reach a large audience Reach a large audience Grow Revenue Others Please select your focus area 2 your can select more than one Reporter Publisher Previous Continue close I'm looking for resources in Select your country Afghanistan Åland Islands Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua and Barbuda Argentina Armenia Aruba Asia Pacific - Regional/Crossborder Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bolivia (Plurinational State of) Bonaire, Sint Eustatius and Saba Bosnia and Herzegovina Botswana Bouvet Island Brazil British Indian Ocean Territory Brunei Darussalam Bulgaria Burkina Faso Burundi Cabo Verde Cambodia Cameroon Canada Cayman Islands Central African Republic Chad Chile China Christmas Island Cocos (Keeling) Islands Colombia Comoros Congo Congo (the Democratic Republic of the) Cook Islands Costa Rica Côte d'Ivoire Croatia Cuba Curaçao Cyprus Czechia Denmark Djibouti Dominica Dominican Republic Ecuador Egypt El Salvador Equatorial Guinea Eritrea Estonia Eswatini Ethiopia Europe - Regional/Crossborder Falkland Islands (Malvinas) Faroe Islands Fiji Finland France French Guiana French Polynesia French Southern Territories Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guernsey Guinea Guinea-Bissau Guyana Haiti Heard Island and McDonald Islands Holy See Honduras Hong Kong Hungary Iceland India Indonesia Iran (Islamic Republic of) Iraq Ireland Isle of Man Israel Italy Jamaica Japan Jersey Jordan Kazakhstan Kenya Kiribati Korea (the Democratic People's Republic of) Korea (the Republic of) Kosovo Kuwait Kyrgyzstan Lao People's Democratic Republic Latin America - Regional/Crossborder Latvia Lebanon Lesotho Liberia Libya Liechtenstein Lithuania Luxembourg Macao Madagascar Malawi Malaysia Maldives Mali Malta Marshall Islands Martinique Mauritania Mauritius Mayotte Mexico Micronesia (Federated States of) Middle East, Africa, Turkey - Regional/Crossborder Moldova (the Republic of) Monaco Mongolia Montenegro Montserrat Morocco Mozambique Myanmar Namibia Nauru Nepal Netherlands New Caledonia New Zealand Nicaragua Niger Nigeria Niue Norfolk Island North America - Regional/Crossborder North Macedonia Northern Mariana Islands Norway Oman Pakistan Palau Palestine Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Poland Portugal Puerto Rico Qatar Réunion Romania Russian Federation Rwanda Saint Barthélemy Saint Helena, Ascension and Tristan da Cunha Saint Kitts and Nevis Saint Lucia Saint Martin (French part) Saint Pierre and Miquelon Saint Vincent and the Grenadines Samoa San Marino Sao Tome and Principe Saudi Arabia Senegal Serbia Seychelles Sierra Leone Singapore Sint Maarten (Dutch part) Slovakia Slovenia Solomon Islands Somalia South Africa South Georgia and the South Sandwich Islands South Sudan Spain Sri Lanka Sudan Suriname Svalbard and Jan Mayen Sweden Switzerland Syrian Arab Republic Taiwan (Province of China) Tajikistan Tanzania, the United Republic of Thailand Timor-Leste Togo Tokelau Tonga Trinidad and Tobago Tunisia Türkiye Turkmenistan Turks and Caicos Islands Tuvalu Uganda Ukraine United Arab Emirates United Kingdom of Great Britain and Northern Ireland United States Minor Outlying Islands United States of America Uruguay Uzbekistan Vanuatu Venezuela (Bolivarian Republic of) Viet Nam Virgin Islands (British) Virgin Islands (U.S.) Wallis and Futuna Western Sahara Yemen Zambia Zimbabwe Go 1 2 3 What’s your goal today? You can select more than one. Strengthen digital journalism Develop your audience Grow your revenue What are you interested in accomplishing? You can select more than one. Which country are you in? Improve your experience by providing the country you’re in Select a country Argentina Australia Austria Bangladesh Belgium Bhutan Bolivia (Plurinational State of) Bosnia and Herzegovina Botswana Brazil Brunei Darussalam Bulgaria Burkina Faso Burundi Cabo Verde Cambodia Cameroon Canada Chile Colombia Congo Congo (the Democratic Republic of the) Costa Rica Croatia Cyprus Czechia Côte d'Ivoire Denmark Dominican Republic Ecuador Egypt El Salvador Estonia Ethiopia Fiji Finland France Georgia Germany Ghana Greece Guatemala Honduras Hong Kong Hungary Iceland India Indonesia Iraq Ireland Israel Italy Japan Jordan Kenya Korea (the Republic of) Kosovo Latvia Lebanon Liberia Lithuania Luxembourg Malaysia Maldives Mali Malta Mexico Middle East, Africa, Turkey - Regional/Crossborder Mongolia Montenegro Morocco Myanmar Namibia Nepal Netherlands New Zealand Nicaragua Niger Nigeria North Macedonia Norway Oman Pakistan Palestine Panama Papua New Guinea Paraguay Peru Philippines Poland Portugal Qatar Romania Rwanda Samoa Saudi Arabia Serbia Sierra Leone Singapore Slovakia Slovenia Solomon Islands South Africa Spain Sri Lanka Sweden Switzerland Syrian Arab Republic Taiwan (Province of China) Thailand Timor-Leste Togo Tonga Tunisia Türkiye Uganda Ukraine United Arab Emirates United Kingdom of Great Britain and Northern Ireland United States of America Uruguay Vanuatu Venezuela (Bolivarian Republic of) Viet Nam Zimbabwe Other Submit Loading... Continue XXXX Lessons XXXX Minutes Back We have recommended resources for you Save results and track your progress Sign in Go to dashboard open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account open_in_new TITLE LABEL1 LABEL2 DESCRIPTION arrow_outward bookmark bookmark_border Remove from your account Save to your account Want to see more? View Resources close close Welcome to the Google News Initiative The Google News Initiative works with publishers and journalists to fight misinformation, share resources, and build a diverse and innovative news ecosystem. Learn more Our most popular resources 1 Lesson Verification: Google Image Search 2 Lesson Google Historical Imagery: Google Earth Pro, Maps and Timelapse 3 Lesson Google News Archive: Access the past. No Results Found We couldn't find what you are looking for Load More chevron_left Hands-on Machine Learning Lesson 5 of 7 Training your Machine Learning model close Hands-on Machine Learning check_box check_box_outline_blank What is Machine Learning check_box check_box_outline_blank Investigating stories with Machine Learning check_box check_box_outline_blank Google Cloud AutoML Vision check_box check_box_outline_blank Data preparation check_box square Training your Machine Learning model check_box check_box_outline_blank Evaluate and Test check_box check_box_outline_blank Hands-on Machine Learning: Take the Quiz Course 0% complete 5 minutes to complete Training your Machine Learning model Import your data in AutoML Vision and start the training process Prepare your data for import It's time to go back to our Google Cloud account and continue the exercise by importing our training datasets to AutoML Vision. The quickest way to add labelled images is to upload separate zipped folders containing examples for each label. In our case, we have two folders/labels: “positive” (images with examples of amber mining) and “negative” (without). You could also upload all the images together and label them manually inside the AutoML Vision interface but it would take much longer. Import the data into AutoML (1) Download on your local disk the two zipped folders: Positive examples Negative examples While they are being downloaded, re-open the Google Cloud platform via this link. Once the two folders have been downloaded to your local disk, follow these steps to upload them to AutoML Vision: Step 1 From the interface, click on “New Dataset”. Step 2 Rename your dataset to something recognisable (for example, “amber_mining”), select “Single-Label Classification” as your model objective, and click on “Create dataset”. Step 3 Keep selected “Upload images from your computer” and click on “Select Files”. From the menu that will open, select both “positive.zip” and “negative.zip”. Confirm your selection. Step 4 Click on “Browse” to select a destination on Cloud Storage and in the window that will open, click on the icon in the top-right corner to “Create new bucket”. Step 5 Give a name to your bucket. For the purpose of this exercise, it doesn’t matter what you select in the following options. Click on “Create” and then on “Select” in the next window. Import the data into AutoML (2) We are now ready to upload the training sets: Step 1 Make sure that both “negative.zip” and “positive.zip” appear in the grey box and click on “Continue”. Wait a few seconds or a few minutes – depending on the speed of your connection – for the images to be uploaded. Step 2 When the upload is complete, click on “Images” from the menu on top of the page and wait for the import process to finish – it might take up to 30 minutes. Step 3 When the import process is done, you will be notified via email. Your Google Cloud Platform will show 1,150 images imported, 900 negative and 250 positive. Training your Machine Learning model We are now ready to start the training process. But first, browse through the images and learn more about our dataset. Check for example some of the "positive" images. Can you see the distinctive holes, trace of amber mining? If you can recognise it, then your model could do it, too. Step 1 For some images, it might not be so easy even for yourself to tell if there are traces of amber mining or not. In the next lesson, we'll see how the model performs on those borderline examples. When you are ready to proceed, click on "Train" Step 2 At this point, the model tells you that "You have enough images to start training". It also informs you  that "Your data set will be automatically split into Train, Validation and Test sets." Let's see what that means. Train, Validation, and Test sets The reason to split our dataset into three separate sets is that we keep some images to the side, so that, after the model is trained, we can evaluate its performance using data it wasn't trained on – but that we know the right label for. If you do not specify how many images to keep in each set, then AutoML Vision uses 80% for training, 10% for validating, and 10% for testing: The training set is what your model "sees" and initially learns from. The validation set is also part of the training process but it's kept separate to tune the model's hyperparameters, variables that specify the model's structure. The test set enters the stage only after the training process. We use it to test the performance of our model on data it has not yet seen. Congratulations! You've just finished Training your Machine Learning model in progress Recommended for you open_in_new Verification: Google Search Lesson Master advanced search shortcuts to filter results by date, relevance and language. arrow_outward Start bookmark bookmark_border Remove from your account Save to your account None open_in_new Grow ad revenue with Google Ad Manager Lesson Get the most out of your ad revenue arrow_outward Start bookmark bookmark_border Remove from your account Save to your account None open_in_new Evaluate your financial sustainability Lesson Understand, measure, and enable your financial sustainability arrow_outward Start bookmark bookmark_border Remove from your account Save to your account None close How would you rate this lesson? Your feedback will help us continuously improve our lessons! Submit make sure you have visited all the steps before moving forward close mail Sign up for the newsletter to get updates from the Google News Initiative Get the newsletter Contact us Copy the url and share Copy Copied close Privacy Terms help Help Cookies management controls test English (GB) English العربيّة Français Français (Canada) Deutsch हिंदी Bahasa Indonesia Italiano 한국어 日本語 Polski Português Português (Brazil) Español (LatAm) Español ภาษาไทย Türkçe 繁體中文 Tiếng việt close close Leave and lose progress? By leaving this page you will lose all progress on your current lesson. Are you sure you want to continue and lose your progress? Yes, Leave Go Back