From 68b73670f9b4bbf4e7b9dceec3bf3784e270232f Mon Sep 17 00:00:00 2001 From: keisen Date: Fri, 2 Jul 2021 23:20:10 +0900 Subject: [PATCH] Hotfix: Improve some error messages --- setup.py | 2 +- tf_keras_vis/activation_maximization/__init__.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 89adac3..f64f5ee 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="tf-keras-vis", - version="0.7.0", + version="0.7.1", author="keisen", author_email="k.keisen@gmail.com", description="Neural network visualization toolkit for tf.keras", diff --git a/tf_keras_vis/activation_maximization/__init__.py b/tf_keras_vis/activation_maximization/__init__.py index 6c56bcd..ca7d79c 100644 --- a/tf_keras_vis/activation_maximization/__init__.py +++ b/tf_keras_vis/activation_maximization/__init__.py @@ -361,7 +361,8 @@ def _get_regularizers(self, regularizer): if legacy_regularizers is not None: warnings.warn( "`tf_keras_vis.utils.regularizers.Regularizer` is deprecated. " - "Use tf_keras_vis.utils.regularizers.Regularizer instead.", DeprecationWarning) + "Use tf_keras_vis.activation_maximization.regularizers.Regularizer instead.", + DeprecationWarning) return legacy_regularizers else: regularizers = self._get_callables_to_apply_to_each_input(regularizer, "regularizers") @@ -393,7 +394,7 @@ def _get_legacy_regularizers(self, regularizer): if any(has_legacy): raise ValueError( "Legacy Regularizer instances (that inherits " - "`tf_keras_vis.utils.regularizers.Regularizer`) must be " + "`tf_keras_vis.utils.regularizers.LegacyRegularizer`) must be " "passed to ActivationMaximization#__call__() " "in the form of a instance or a list of instances. " "Please modify the `regularizer` argument or " @@ -409,7 +410,7 @@ def _get_legacy_regularizers(self, regularizer): "the regularizer instance (that inherits " "`tf_keras_vis.activation_maximization.regularizers.Regularizer`) " "and legacy regularizer (that inherits " - "`tf_keras_vis.utils.regularizers.Regularizer` can NOT be mixed." + "`tf_keras_vis.utils.regularizers.LegacyRegularizer` can NOT be mixed." f" regularizer: {regularizer}") elif isinstance(_regularizer, LegacyRegularizer): return listify(_regularizer)