“Last gespeichertes Modell” Code-Antworten

Last gespeichertes Modell

from keras.models import load_model
model = load_model('my_model.h5')
Clumsy Crocodile

Last gespeichertes Modell

#Now you can predict results for a new entry image.

from keras.preprocessing import image

test_image = image.load_img(imagePath, target_size = (64, 64)) 
test_image = image.img_to_array(test_image)
test_image = np.expand_dims(test_image, axis = 0)

#predict the result
result = model.predict(test_image)
Clumsy Crocodile

Last gespeichertes Modell

# compile the model in order to make predictions
model.compile(optimizer = 'adam', loss = 'binary_crossentropy', metrics = ['accuracy'])
Clumsy Crocodile

Ähnliche Antworten wie “Last gespeichertes Modell”

Fragen ähnlich wie “Last gespeichertes Modell”

Weitere verwandte Antworten zu “Last gespeichertes Modell” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen