Use deserialize-helper for deserializing dict activations
This commit is contained in:
parent
91a3741164
commit
4b161717ae
@ -458,11 +458,10 @@ def get(identifier):
|
|||||||
if isinstance(identifier, six.string_types):
|
if isinstance(identifier, six.string_types):
|
||||||
identifier = str(identifier)
|
identifier = str(identifier)
|
||||||
return deserialize(identifier)
|
return deserialize(identifier)
|
||||||
|
elif isinstance(identifier, dict):
|
||||||
|
return deserialize(identifier)
|
||||||
elif callable(identifier):
|
elif callable(identifier):
|
||||||
return identifier
|
return identifier
|
||||||
elif isinstance(identifier, dict):
|
|
||||||
return deserialize_keras_object(
|
|
||||||
identifier, printable_module_name='activation')
|
|
||||||
else:
|
else:
|
||||||
raise TypeError(
|
raise TypeError(
|
||||||
'Could not interpret activation function identifier: {}'.format(
|
'Could not interpret activation function identifier: {}'.format(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user