Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help getting a .hd5f file with model architecture and weights #49

Open
Skmadigan opened this issue Nov 3, 2022 · 0 comments
Open

Help getting a .hd5f file with model architecture and weights #49

Skmadigan opened this issue Nov 3, 2022 · 0 comments

Comments

@Skmadigan
Copy link

Skmadigan commented Nov 3, 2022

Thank you for this repository! I am using the pre-trained weights downloaded here, and it looks like the .h5 file has only the weights and not the model architecture. Is there a way to extract the model architecture from the weights? I've tried the code below, but it just prints "None" for the model configuration. Is there a place I could find a generic config.json file for the Mask-RCNN architecture and somehow merge the weights with it?

from tensorflow import keras

import h5py
f = h5py.File('mask_rcnn_taco_0100.h5', 'r')
print(f.attrs.get('model_config'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant