Light-- edited a comment on issue #647:
URL: https://github.com/apache/incubator-mxnet/issues/647#issuecomment-722755668


   any guidance here? how to save the multi-output symbol?
   i used this, 
   ```
   arg, aux = model.get_params()
   all_layers = model.symbol.get_internals()
   _sym = all_layers['fc1_output', 'fcAge_output', 'fcGen_output', 
'fcRac_output']
   _arg = {}
   for k in arg:
        _arg[k] = arg[k]
   mx.model.save_checkpoint(prefix, msave, _sym, _arg, aux)
   ```
   
   
   but failed....
   ```
   Traceback (most recent call last):
     File "train_110511.py", line 422, in <module>
       main()
     File "train_110511.py", line 419, in main
       train_net(args)
     File "train_110511.py", line 414, in train_net
       epoch_end_callback = epoch_cb )
     File 
"/home/usr1/miniconda3/envs/py377/lib/python3.7/site-packages/mxnet/module/base_module.py",
 line 553, in fit
       callback(batch_end_params)
     File "train_110511.py", line 382, in _batch_callback
       _sym = all_layers['fc1_output', 'fcAge_output', 'fcGen_output', 
'fcRac_output']
     File 
"/home/usr1/miniconda3/envs/py377/lib/python3.7/site-packages/mxnet/symbol/symbol.py",
 line 550, in __getitem__
       raise TypeError('Symbol only support integer index to fetch i-th output')
   TypeError: Symbol only support integer index to fetch i-th output
   ```
   
   i don't know why, because when i run single-task network, ```_sym = 
all_layers['fc1_output'] ``` worked.
   @tqchen @pluskid @piiswrong @ChrisYang @arank 


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

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