Set states of recurrent op as dependent vars in prune (#19865)
* Set states of recurrent op as dependent vars in prune of save inference model This PR will fix the save/load inference model problem of RNN models. The reason of the bug is that save_inferenc_model will prune OPs that doesn't contribute to Output. But in recurrent_op, States are not Output, OPs refers States will be pruned. This fix adds States of recurrent_op as dependent var so that OPs referring States won't be pruned.
Showing
想要评论请 注册 或 登录