tf.keras.models.load_model()

Description

The function loads a model saved via model.save().

The function returns a Keras model instance. If the original model was compiled and saved with the optimizer, then the returned model will be compiled. Otherwise, the model will be left uncompiled. In the case that an uncompiled model is returned, a warning is displayed if the compile the argument is set to True.

Import Libraries

####################imports####################
#do not change

import cv2
import numpy as np
import tensorflow as tf

#do not change
####################imports####################

Sample Use

model=tf.keras.models.load_model(
		'saved_model.h5', 
		custom_objects=None,
		compile=True, 
		options=None)

Parameters

Example

It seems we can't find what you're looking for.
Table of Contents