• L
    control flow: support optimizer called (#21851) · 7d8d4599
    liym27 提交于
    * append optimize op in the grad block of current block if current block is in control flow. test=develop
    
    * add conditional grad op when optimizer used in control flow. test=develop
    
    * add comment and modify typo. test=develop
    
    * fix append_backward to support control flow. test=develop
    
    * add test. test=develop
    
    * fix copy_var_to_parent_block and conditional_block_grad. test=develop
    
    * fix bug: revert to append conditional_block_grad vars to sub grad block. test=develop
    
    * fix bug: revert to assign var to parent block even if var already is in parent block
    
    * fix bug: consider outputs is empty. test=develop
    
    * move _rename_grad_ out. test=develop
    
    * modify code according to reviews from Huihuang. test=develop
    
    * modify code according to reviews from Jinle. test=develop
    7d8d4599
optimizer.py 158.9 KB