Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
piiswrong committed Jun 11, 2018
1 parent 7330226 commit a54569b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/mxnet/gluon/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,11 @@ def save_params(self, filename):
Path to file.
"""
warnings.warn("save_params is deprecated. Please use save_parameters.")
self.collect_params().save(filename, strip_prefix=self.prefix)
try:
self.collect_params().save(filename, strip_prefix=self.prefix)
except ValueError as e:
raise ValueError('%s\nsave_params is deprecated. Using ' \
'save_parameters may resolve this error.'%e.message)

def load_parameters(self, filename, ctx=None, allow_missing=False,
ignore_extra=False):
Expand Down

0 comments on commit a54569b

Please sign in to comment.