keras-onnx icon indicating copy to clipboard operation
keras-onnx copied to clipboard

How to load custom model

Open saisubramani opened this issue 5 years ago • 5 comments
trafficstars

Hi i am trying to load the peleenet model created by Keras frame work. I am having the trained weight files " .hdf5 " . Now i am trying to convert the keras model to onnx model, i am having a doubt that how can i load the the model file as you gave a example : model = ResNet50(include_top=True, weights='imagenet')

Insted of ResNet50 i want to load my model Is it possible to load ? if yes please give an example

saisubramani avatar Feb 11 '20 12:02 saisubramani

This seems a keras issue rather than the converter issue.

jiafatom avatar Feb 11 '20 23:02 jiafatom

model.load_weights is to help you load the pre-trained weights file.

wenbingl avatar Feb 12 '20 18:02 wenbingl

thanks for the reply, @wenbingl i will try and update

saisubramani avatar Feb 13 '20 10:02 saisubramani

This seems a keras issue rather than the converter issue.

thanks for your reply,can you say details? what is causing the problems in keras as i am beginner to it i can able to jump into deep.

saisubramani avatar Feb 13 '20 10:02 saisubramani

should be something like model = ResNet50(include_top=True, weights="") model.load_weights("your-pretrained-model-files")

wenbingl avatar Feb 20 '20 18:02 wenbingl