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

Problem with loading the compressed model #20

Open
dsnsabari opened this issue Nov 13, 2019 · 3 comments
Open

Problem with loading the compressed model #20

dsnsabari opened this issue Nov 13, 2019 · 3 comments

Comments

@dsnsabari
Copy link

While loading the compressed model , I am getting the below error.

File "C:\Users\user\Anaconda3\lib\site-packages\keras\utils\generic_utils.py", line 138, in deserialize_keras_object
': ' + class_name)

ValueError: Unknown layer: FactorizedConv2DTucker

from keras.models import load_model

model0 = load_model('E:/Model_Compression/keras_compressor-master/example/mnist/model_compressed.h5')

@sunejas
Copy link

sunejas commented Mar 12, 2020

Hi @dsnsabari, i am facing the same issue, did you find any solution for this ?

@sunejas
Copy link

sunejas commented Mar 12, 2020

Resolved above error on loading compressed model as:
model = load_model(model_path, custom_objects)
where custom objects =
{'FactorizedConv2DTucker': <class 'keras_compressor.layers.FactorizedConv2DTucker'>, 'FactorizedDense': <class 'keras_compressor.layers.FactorizedDense'>}

but now facing this error :
"ValueError: Unknown metric function: {'class_name': 'MeanMetricWrapper', 'config': {'name': 'accuracy', 'dtype': 'float32'}}"

any idea how to reslove this?!

@ZhaoYibo61
Copy link

@sunejas Has this problem been solved?

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

3 participants