-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hi, I have trained a network with keras, and exported it to a .h5 file. I used the code in this repo. to generate the .pb model, and try to predict images using imagej with your plug-in. It appears that the python results and imagej predicted results are very different. Can you tell me what the potential mistake is ? Many thanks !
path2network='./model.h5'
K.set_learning_phase(0)
model = keras.models.load_model(path2network)
print(model.summary())
OUTPUT_DIR = "./tf_model"
builder = tf.saved_model.builder.SavedModelBuilder(OUTPUT_DIR)
signature = tf.saved_model.signature_def_utils.predict_signature_def(
inputs = {'input': model.input},
outputs = {'output': model.output})
signature_def_map = { tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY: signature }
builder.add_meta_graph_and_variables(K.get_session(), [tf.saved_model.tag_constants.SERVING],
signature_def_map=signature_def_map)
builder.save()
start preprocessing
end preprocessing 0.02025772
Extract Patch 0.172213ms
Build Tensor 7.995988ms
Session feed 0.026279999999999998ms
Session fetch0 0.031226999999999998ms
Session run 154.684742ms
Convert output 4.818864ms
Create ImageJ object 14.75155ms
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working