Why do we need to apply : np.expand_dims on our image before entering x_train aw input parameter into model.predict_on_batch ? (5.1 part of the exercise)
def img_to_encoding(image_path, model):
img = tf.keras.preprocessing.image.load_img(image_path, target_size=(160, 160))
img = np.around(np.array(img) / 255.0, decimals=12)
x_train = np.expand_dims(img, axis=0)
embedding = model.predict_on_batch(x_train)