Skip to content

Commit

Permalink
Merge pull request #65 from keisen/hotfixes/fixes-incorrect-error-mes…
Browse files Browse the repository at this point in the history
…sage

Hotfix: Improve some error messages
  • Loading branch information
keisen authored Jul 2, 2021
2 parents 8bc4c8f + 68b7367 commit ab21593
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="tf-keras-vis",
version="0.7.0",
version="0.7.1",
author="keisen",
author_email="[email protected]",
description="Neural network visualization toolkit for tf.keras",
Expand Down
7 changes: 4 additions & 3 deletions tf_keras_vis/activation_maximization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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 "
Expand All @@ -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)
Expand Down

0 comments on commit ab21593

Please sign in to comment.