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

how to load the "padded" version of MimickNet model ? #21

Open
Shengwuei opened this issue Aug 9, 2023 · 2 comments
Open

how to load the "padded" version of MimickNet model ? #21

Shengwuei opened this issue Aug 9, 2023 · 2 comments

Comments

@Shengwuei
Copy link

Hi Sir,

In Python, below codes load the model "mimicknet_1568473738-210304.h5" successfully

mimicknet_model = tf.keras.models.load_model('./mimicknet_1568473738-210304.h5' compile=False)

However, if change the model file to 'padded_mimicknet_1568473738-210304.h5', it gives me the error :

ValueError: bad marshal data (unknown type code)

After some googling, that might be related to the Python version used when compiling the model file, though I believe you compiled these models under the same Python version (?), so for now I have no idea about how to proceed.

As my understanding, the "padded" version has built in the custom_pad() and custom_depad() function in layer input and output, so I can directly use the model without the codes to define custom_pad() and custom_depad(), so I would prefer to use the "padded" version, thanks and very appreciated for your help .

@Ouwen
Copy link
Owner

Ouwen commented Aug 11, 2023

Since colab and tensorflow have updated, the padded version needs to be updated. For now, the colab notebook should be updated to work with latest. However, the padded model will require an older version of tensorflow

@Shengwuei
Copy link
Author

Got it, thanks !

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

2 participants