# 下載并安裝TensorFlow 2軟體包。將TensorFlow匯入程式中:
from __future__ import absolute_import, division, print_function, unicode_literals
# Install TensorFlow
import tensorflow as tf
from keras.applications.imagenet_utils import decode_predictions
import matplotlib.pyplot as plt
from PIL import Image
# 保存模型:
keras_model_path = "keras_save"
# 現在,從該檔案重新加載模型:
model = tf.keras.models.load_model(keras_model_path)
#單個圖片預測
data_dir = r'D:\images\shuzitest\shuzi\IM10.jpg'
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/123819.html
上一篇:Python小白想請教一個關于np.vstack的問題
下一篇:求一個vhdl檔案
