rgsachin / CoVe

Keras implementation of CoVe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SystemError: unknown opcode

mikkokotila opened this issue · comments

After doing:

from keras.models import load_model
cove_model = load_model('Keras_CoVe.h5')

I get:

---------------------------------------------------------------------------
SystemError                               Traceback (most recent call last)
<ipython-input-16-c8371c8a91f2> in <module>()
      1 from keras.models import load_model
----> 2 cove_model = load_model('/Users/mikko/Downloads/Keras_CoVe.h5')

~/miniconda3/envs/wip_conda/lib/python3.6/site-packages/keras/engine/saving.py in load_model(filepath, custom_objects, compile)
    417     f = h5dict(filepath, 'r')
    418     try:
--> 419         model = _deserialize_model(f, custom_objects, compile)
    420     finally:
    421         if opened_new_file:

~/miniconda3/envs/wip_conda/lib/python3.6/site-packages/keras/engine/saving.py in _deserialize_model(f, custom_objects, compile)
    223         raise ValueError('No model found in config.')
    224     model_config = json.loads(model_config.decode('utf-8'))
--> 225     model = model_from_config(model_config, custom_objects=custom_objects)
    226     model_weights_group = f['model_weights']
    227 

~/miniconda3/envs/wip_conda/lib/python3.6/site-packages/keras/engine/saving.py in model_from_config(config, custom_objects)
    456                         '`Sequential.from_config(config)`?')
    457     from ..layers import deserialize
--> 458     return deserialize(config, custom_objects=custom_objects)
    459 
    460 

~/miniconda3/envs/wip_conda/lib/python3.6/site-packages/keras/layers/__init__.py in deserialize(config, custom_objects)
     53                                     module_objects=globs,
     54                                     custom_objects=custom_objects,
---> 55                                     printable_module_name='layer')

~/miniconda3/envs/wip_conda/lib/python3.6/site-packages/keras/utils/generic_utils.py in deserialize_keras_object(identifier, module_objects, custom_objects, printable_module_name)
    143                     config['config'],
    144                     custom_objects=dict(list(_GLOBAL_CUSTOM_OBJECTS.items()) +
--> 145                                         list(custom_objects.items())))
    146             with CustomObjectScope(custom_objects):
    147                 return cls.from_config(config['config'])

~/miniconda3/envs/wip_conda/lib/python3.6/site-packages/keras/engine/network.py in from_config(cls, config, custom_objects)
   1030                 if layer in unprocessed_nodes:
   1031                     for node_data in unprocessed_nodes.pop(layer):
-> 1032                         process_node(layer, node_data)
   1033 
   1034         name = config.get('name')

~/miniconda3/envs/wip_conda/lib/python3.6/site-packages/keras/engine/network.py in process_node(layer, node_data)
    989             # and building the layer if needed.
    990             if input_tensors:
--> 991                 layer(unpack_singleton(input_tensors), **kwargs)
    992 
    993         def process_layer(layer_data):

~/miniconda3/envs/wip_conda/lib/python3.6/site-packages/keras/engine/base_layer.py in __call__(self, inputs, **kwargs)
    455             # Actually call the layer,
    456             # collecting output(s), mask(s), and shape(s).
--> 457             output = self.call(inputs, **kwargs)
    458             output_mask = self.compute_mask(inputs, previous_mask)
    459 

~/miniconda3/envs/wip_conda/lib/python3.6/site-packages/keras/layers/core.py in call(self, inputs, mask)
    685         if has_arg(self.function, 'mask'):
    686             arguments['mask'] = mask
--> 687         return self.function(inputs, **arguments)
    688 
    689     def compute_mask(self, inputs, mask=None):

~/miniconda3/envs/wip_conda/lib/python3.6/site-packages/keras/layers/core.py in <lambda>(x)

SystemError: unknown opcode