From 4b161717ae7766111a7625b9110b730c4176ec03 Mon Sep 17 00:00:00 2001 From: Kristian Hartikainen Date: Thu, 6 Feb 2020 17:48:11 +0000 Subject: [PATCH] Use deserialize-helper for deserializing dict activations --- tensorflow/python/keras/activations.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tensorflow/python/keras/activations.py b/tensorflow/python/keras/activations.py index 3e23b6de6db..9cd70a527b0 100644 --- a/tensorflow/python/keras/activations.py +++ b/tensorflow/python/keras/activations.py @@ -458,11 +458,10 @@ def get(identifier): if isinstance(identifier, six.string_types): identifier = str(identifier) return deserialize(identifier) + elif isinstance(identifier, dict): + return deserialize(identifier) elif callable(identifier): return identifier - elif isinstance(identifier, dict): - return deserialize_keras_object( - identifier, printable_module_name='activation') else: raise TypeError( 'Could not interpret activation function identifier: {}'.format(