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/06/11 03:11:20 UTC

[GitHub] rocketbear opened a new issue #11222: Bug in gluon.block.Block.LoadParams

rocketbear opened a new issue #11222: Bug in gluon.block.Block.LoadParams
URL: https://github.com/apache/incubator-mxnet/issues/11222
 
 
   The following code is in the LoadParams function:
   
           for name in loaded:
               if not ignore_extra and name not in params:
                   raise ValueError(
                       "Parameter '%s' loaded from file '%s' is not present in ParameterDict, " \
                       "which contains parameters %s. Set ignore_extra=True to ignore. "%(
                           name, filename, _brief_print_list(self._params.keys())))
               params[name]._load_init(loaded[name], ctx)
   
   Apparently this code is buggy if name is in loaded but not in params.
   The last line should be changed to:
   ```
           if name in params:
               params[name]._load_init(loaded[name], ctx)
   ```
   
   

----------------------------------------------------------------
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