Teaching Computers to Learn•Interactive notebook lesson•Free
dog cat prediction
No account is required. Learn the material, try the examples, and mark it complete locally when you are ready to move on.
🐶🐱 Dog vs Cat Prediction Notebook
Download an image and classify it using a trained VGG16 model.
Codepython
# !pip install tensorflow
Codepython
import urllib.request
import cv2
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from tensorflow.keras.models import load_model
from tensorflow.keras.applications.vgg16 import preprocess_inputOutput
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1774115950.554664 12324 port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
I0000 00:00:1774115950.585673 12324 cpu_feature_guard.cc:227] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1774115951.433409 12324 port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.