Skip to content

Commit

Permalink
marshal: Restrict types for Keras backend
Browse files Browse the repository at this point in the history
Change the type marching from `keras*` to `keras.*` for the Keras
backend to use stand pickling for objects likes
`keras_preprocessing.text.Tokenizers`.

Signed-off-by: Stefano Fioravanzo <[email protected]>
  • Loading branch information
StefanoFioravanzo committed Oct 14, 2020
1 parent c3d602a commit 747e80e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/kale/marshal/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def resource_keras_load(uri, **kwargs):
return fallback_load(uri, **kwargs)


@resource_save.register(r'keras.*')
@resource_save.register(r'keras\..*')
def resource_keras_save(obj, path, **kwargs):
"""Save a Keras model."""
try:
Expand Down

0 comments on commit 747e80e

Please sign in to comment.