In [2]:
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import matplotlib.image as mpimg

import tensorflow_hub as hub
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, GlobalAveragePooling2D
from tensorflow.keras.preprocessing.image import ImageDataGenerator
In [3]:
URL = "https://tfhub.dev/google/tf2-preview/mobilenet_v2/feature_vector/2"
In [4]:
feature_extractor = hub.KerasLayer(URL, input_shape=(224, 224, 3))