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

Commit

Permalink
MXNet Release-1.2.1 patch (#11548)
Browse files Browse the repository at this point in the history
* Fix save_params warning mesage (#11532)

* Update block.py (#11540)

nit fix
  • Loading branch information
Roshrini authored and anirudh2290 committed Jul 9, 2018
1 parent c5dbc81 commit 71fc119
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions python/mxnet/gluon/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,19 @@ def save_parameters(self, filename):
ndarray.save(filename, arg_dict)

def save_params(self, filename):
"""[Deprecated] Please use save_parameters.
"""[Deprecated] Please use save_parameters. Note that if you want to load
from SymbolBlock later, please use export instead.
Save parameters to file.
filename : str
Path to file.
"""
warnings.warn("save_params is deprecated. Please use save_parameters.")
warnings.warn("save_params is deprecated. Please use save_parameters. "
"Note that if you want to load from SymbolBlock later, please "
"use export instead. For details, see "
"https://mxnet.incubator.apache.org/tutorials/gluon/save_lo"
"ad_params.html")
try:
self.collect_params().save(filename, strip_prefix=self.prefix)
except ValueError as e:
Expand Down

0 comments on commit 71fc119

Please sign in to comment.