American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6:30 PM – AI / ML – Shawn

December 9, 2023 @ 6:30 pm - 7:30 pm

Today We Did
  1. Started our Cats Vs Dogs project
    1. Learned about Fastai, file paths, dataloaders, and machine learning models
  2. https://colab.research.google.com/drive/1YxHrVsv_qDhywniQqR0RAKTAdR8q3Hno?usp=sharing
Homework
  1. You might have to re-run all the cells to use your model if you leave the page and come back to it.
    1. Go to Runtime -> Change Runtime and make sure T4 GPU is selected
    2. Go to Runtime -> Run All
  2. Try predicting some images using learn.predict(files[0]). Play around with the 0 to change around the images as well!
  3. Run learn.show_results() a couple times. See how your learner does.
  4. Add the following code:
    from google.colab import files
    uploaded_file = files.upload()
    img_content = None
    for file_name in uploaded_file.keys():
        img_content = uploaded_file[file_name]
    1. Above code will provide an upload button. Click the upload button and upload a cat or dog image of your own. You can find a cat or dog image from google.
    2. Try passing in the img_content you upload into learn.predict, and see the result. If you upload a cat image then, learn.predict(img_content) will return True. If not will return False.

Email me at szhuang@ayclogic.com if you have any questions!

Details

Date:
December 9, 2023
Time:
6:30 pm - 7:30 pm
Verified by MonsterInsights