You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/05/13 04:27:30 UTC
[GitHub] altosaar opened a new issue #10919: gluon.Block load_params method
does not accept python3 pathlib.Path
altosaar opened a new issue #10919: gluon.Block load_params method does not accept python3 pathlib.Path
URL: https://github.com/apache/incubator-mxnet/issues/10919
gluon.Block `load_params` method should accept not only strings, but also pathlib.Path types that are new in python 3.
```---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-31-aa0ab27bd19c> in <module>()
----> 1 poisson_fa.load_params(cfg['train_dir'] / 'model.params')
~/.local/lib/python3.6/site-packages/mxnet/gluon/block.py in load_params(self, filename, ctx, allow_missing, ignore_extra)
329 present in this Block.
330 """
--> 331 loaded = ndarray.load(filename)
332 params = self._collect_params_with_prefix()
333 if not loaded and not params:
~/.local/lib/python3.6/site-packages/mxnet/ndarray/utils.py in load(fname)
164 """
165 if not isinstance(fname, string_types):
--> 166 raise TypeError('fname required to be a string')
167 out_size = mx_uint()
168 out_name_size = mx_uint()
TypeError: fname required to be a string
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services