@tensorleap_load_model
code_loader.inner_leap_binder.leapbinder_decorators.tensorleap_load_model
import os
from code_loader.contract.datasetclasses import PredictionTypeHandler
from code_loader.inner_leap_binder.leapbinder_decorators import tensorleap_load_model
import tensorflow as tf
prediction_type1 = PredictionTypeHandler('classes',[str(i) for i in range(10)])
@tensorleap_load_model([prediction_type1])
def load_model():
dir_path = os.path.dirname(os.path.abspath(__file__))
model_path = 'model/model.h5'
cnn = tf.keras.models.load_model(os.path.join(dir_path, model_path))
return cnn
Args
PredictionTypes Examples
MNIST example
YOLO example
Last updated
Was this helpful?

