Created
August 29, 2018 13:07
-
-
Save abhisheksoni27/732bec240629d2dd721e80130cb2956b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------------------------- | |
TypeError Traceback (most recent call last) | |
<ipython-input-183-74b2cf4f5e86> in <module>() | |
----> 1 model = load_model('muteTV.h5') | |
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/saving.py in load_model(filepath, custom_objects, compile) | |
227 raise ValueError('No model found in config file.') | |
228 model_config = json.loads(model_config.decode('utf-8')) | |
--> 229 model = model_from_config(model_config, custom_objects=custom_objects) | |
230 | |
231 # set weights | |
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/saving.py in model_from_config(config, custom_objects) | |
304 '`Sequential.from_config(config)`?') | |
305 from tensorflow.python.keras.layers import deserialize # pylint: disable=g-import-not-at-top | |
--> 306 return deserialize(config, custom_objects=custom_objects) | |
307 | |
308 | |
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/layers/serialization.py in deserialize(config, custom_objects) | |
62 module_objects=globs, | |
63 custom_objects=custom_objects, | |
---> 64 printable_module_name='layer') | |
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/utils/generic_utils.py in deserialize_keras_object(identifier, module_objects, custom_objects, printable_module_name) | |
171 custom_objects=dict( | |
172 list(_GLOBAL_CUSTOM_OBJECTS.items()) + | |
--> 173 list(custom_objects.items()))) | |
174 with CustomObjectScope(custom_objects): | |
175 return cls.from_config(config['config']) | |
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/network.py in from_config(cls, config, custom_objects) | |
1207 # First, we create all layers and enqueue nodes to be processed | |
1208 for layer_data in config['layers']: | |
-> 1209 process_layer(layer_data) | |
1210 # Then we process nodes in order of layer depth. | |
1211 # Nodes that cannot yet be processed (if the inbound node | |
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/network.py in process_layer(layer_data) | |
1193 from tensorflow.python.keras.layers import deserialize as deserialize_layer # pylint: disable=g-import-not-at-top | |
1194 | |
-> 1195 layer = deserialize_layer(layer_data, custom_objects=custom_objects) | |
1196 created_layers[layer_name] = layer | |
1197 | |
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/layers/serialization.py in deserialize(config, custom_objects) | |
62 module_objects=globs, | |
63 custom_objects=custom_objects, | |
---> 64 printable_module_name='layer') | |
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/utils/generic_utils.py in deserialize_keras_object(identifier, module_objects, custom_objects, printable_module_name) | |
173 list(custom_objects.items()))) | |
174 with CustomObjectScope(custom_objects): | |
--> 175 return cls.from_config(config['config']) | |
176 else: | |
177 # Then `cls` may be a function returning a class. | |
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py in from_config(cls, config) | |
1551 A layer instance. | |
1552 """ | |
-> 1553 return cls(**config) | |
1554 | |
1555 | |
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/layers/advanced_activations.py in __init__(self, max_value, **kwargs) | |
300 super(ReLU, self).__init__(**kwargs) | |
301 self.support_masking = True | |
--> 302 self.max_value = K.cast_to_floatx(max_value) | |
303 if self.max_value < 0.: | |
304 raise ValueError('max_value of Relu layer ' | |
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/backend.py in cast_to_floatx(x) | |
214 ``` | |
215 """ | |
--> 216 return np.asarray(x, dtype=_FLOATX) | |
217 | |
218 | |
/usr/local/lib/python3.6/dist-packages/numpy/core/numeric.py in asarray(a, dtype, order) | |
490 | |
491 """ | |
--> 492 return array(a, dtype, copy=False, order=order) | |
493 | |
494 | |
TypeError: float() argument must be a string or a number, not 'dict' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment