chansonzhang opened a new issue #20577:
URL: https://github.com/apache/incubator-mxnet/issues/20577


   ### Discussed in https://github.com/apache/incubator-mxnet/discussions/20575
   
   <div type='discussions-op-text'>
   
   <sup>Originally posted by **chansonzhang** September 12, 2021</sup>
   When I run the code in the guide 
[https://nlp.gluon.ai/v0.9.x/examples/sentence_embedding/bert.html#Deployment](https://nlp.gluon.ai/v0.9.x/examples/sentence_embedding/bert.html#Deployment),
 it reported `AttributeError: 'SymbolBlock' object has no attribute 
'_cached_op_args'` in code line `net.export(prefix, epoch=0)`
   
   ---------------------------------------------------------------------------
   AttributeError                            Traceback (most recent call last)
   <ipython-input-34-1fbc24d27746> in <module>()
        26 # will remove until mxnet 1.7 release.
        27 try:
   ---> 28     eval_metric = deployment(quantized_net, prefix, dev_dataloader)
        29 except NameError:
        30     nlp.utils.version.check_version('1.7.0', warning_only=True, 
library=mx)
   
   1 frames
   /usr/local/lib/python3.7/dist-packages/mxnet/gluon/block.py in export(self, 
path, epoch, remove_amp_cast)
      1246         aux_names = set(sym.list_auxiliary_states())
      1247         arg_dict = {}
   -> 1248         for is_arg, param in self._cached_op_args:
      1249             if not is_arg:
      1250                 name = param.name
   
   AttributeError: 'SymbolBlock' object has no attribute '_cached_op_args'</div>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to