You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HI ,
I have train a keras mode based on tensorflow.contrib.keras and save it in h5 format. But it can't not run compress.py and some error。
Using TensorFlow backend.
Traceback (most recent call last):
File "F:/Project/text_classification/My_Text/compress_model.py", line 9, in
model = load_model('CNNTEXT/pretrain_cnn/model_3cnn.h5')
File "D:\Miniconda3\lib\site-packages\keras\models.py", line 240, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "D:\Miniconda3\lib\site-packages\keras\models.py", line 301, in model_from_config
return layer_module.deserialize(config, custom_objects=custom_objects)
File "D:\Miniconda3\lib\site-packages\keras\layers_init_.py", line 46, in deserialize
printable_module_name='layer')
File "D:\Miniconda3\lib\site-packages\keras\utils\generic_utils.py", line 140, in deserialize_keras_object
list(custom_objects.items())))
File "D:\Miniconda3\lib\site-packages\keras\engine\topology.py", line 2378, in from_config
process_layer(layer_data)
File "D:\Miniconda3\lib\site-packages\keras\engine\topology.py", line 2347, in process_layer
custom_objects=custom_objects)
File "D:\Miniconda3\lib\site-packages\keras\layers_init_.py", line 46, in deserialize
printable_module_name='layer')
File "D:\Miniconda3\lib\site-packages\keras\utils\generic_utils.py", line 141, in deserialize_keras_object
return cls.from_config(config['config'])
File "D:\Miniconda3\lib\site-packages\keras\engine\topology.py", line 1210, in from_config
return cls(**config)
File "D:\Miniconda3\lib\site-packages\keras\legacy\interfaces.py", line 88, in wrapper
return func(*args, **kwargs)
File "D:\Miniconda3\lib\site-packages\keras\layers\embeddings.py", line 88, in init
self.embeddings_initializer = initializers.get(embeddings_initializer)
File "D:\Miniconda3\lib\site-packages\keras\initializers.py", line 463, in get
return deserialize(identifier)
File "D:\Miniconda3\lib\site-packages\keras\initializers.py", line 458, in deserialize
printable_module_name='initializer')
File "D:\Miniconda3\lib\site-packages\keras\utils\generic_utils.py", line 141, in deserialize_keras_object
return cls.from_config(config['config'])
File "D:\Miniconda3\lib\site-packages\keras\initializers.py", line 21, in from_config
return cls(**config)
TypeError: init() got an unexpected keyword argument 'dtype'
The text was updated successfully, but these errors were encountered:
HI ,
I have train a keras mode based on tensorflow.contrib.keras and save it in h5 format. But it can't not run compress.py and some error。
Using TensorFlow backend.
Traceback (most recent call last):
File "F:/Project/text_classification/My_Text/compress_model.py", line 9, in
model = load_model('CNNTEXT/pretrain_cnn/model_3cnn.h5')
File "D:\Miniconda3\lib\site-packages\keras\models.py", line 240, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "D:\Miniconda3\lib\site-packages\keras\models.py", line 301, in model_from_config
return layer_module.deserialize(config, custom_objects=custom_objects)
File "D:\Miniconda3\lib\site-packages\keras\layers_init_.py", line 46, in deserialize
printable_module_name='layer')
File "D:\Miniconda3\lib\site-packages\keras\utils\generic_utils.py", line 140, in deserialize_keras_object
list(custom_objects.items())))
File "D:\Miniconda3\lib\site-packages\keras\engine\topology.py", line 2378, in from_config
process_layer(layer_data)
File "D:\Miniconda3\lib\site-packages\keras\engine\topology.py", line 2347, in process_layer
custom_objects=custom_objects)
File "D:\Miniconda3\lib\site-packages\keras\layers_init_.py", line 46, in deserialize
printable_module_name='layer')
File "D:\Miniconda3\lib\site-packages\keras\utils\generic_utils.py", line 141, in deserialize_keras_object
return cls.from_config(config['config'])
File "D:\Miniconda3\lib\site-packages\keras\engine\topology.py", line 1210, in from_config
return cls(**config)
File "D:\Miniconda3\lib\site-packages\keras\legacy\interfaces.py", line 88, in wrapper
return func(*args, **kwargs)
File "D:\Miniconda3\lib\site-packages\keras\layers\embeddings.py", line 88, in init
self.embeddings_initializer = initializers.get(embeddings_initializer)
File "D:\Miniconda3\lib\site-packages\keras\initializers.py", line 463, in get
return deserialize(identifier)
File "D:\Miniconda3\lib\site-packages\keras\initializers.py", line 458, in deserialize
printable_module_name='initializer')
File "D:\Miniconda3\lib\site-packages\keras\utils\generic_utils.py", line 141, in deserialize_keras_object
return cls.from_config(config['config'])
File "D:\Miniconda3\lib\site-packages\keras\initializers.py", line 21, in from_config
return cls(**config)
TypeError: init() got an unexpected keyword argument 'dtype'
The text was updated successfully, but these errors were encountered: