1. 15 6月, 2021 1 次提交
    • W
      [Cherry-Pick] Fix the segfault when using to_tensor in PyLayer. (#33303) (#33518) · 0079e0b1
      WeiXin 提交于
      修复pylayer 返回to_tensor时触发段错误的bug。
      原因:
      
      如果在Python端修改了stop_gradient属性,c++ 端InnerSetOverridedStopGradient 无法修改stop_gradient属性,在c++端调用SetOverridedStopGradient修改stop_gradient属性。
      to_tensor产生的tensor的grad var的DataType为默认值(-1),在backward的过程中grad var的DataType不能为默认值(-1),因此在调用ForwardDataType设置grad var的DataType。
      
      原始PR:#33303
      0079e0b1
  2. 07 5月, 2021 2 次提交
  3. 26 4月, 2021 1 次提交
  4. 15 4月, 2021 1 次提交
    • W
      Customizable Python Layer in Dygraph (#32130) · 29f65225
      WeiXin 提交于
      * custom python backward
      
      * polish up the code
      
      * polish up the code
      
      * polish up the code.
      
      * Fix code format and comments.
      
      * Delete redundant files.
      
      * add unnittest.
      
      * edit unnittest.
      
      * edit unnittest.
      
      * Remove redundant header files.
      
      * Improve coverage and remove redundant code.
      
      * support saving for backward.
      
      * polish code according to comments.
      
      * Add support type for PyLayer.
      
      * Modify the DOC.
      
      * polish Doc.
      
      * polish Doc.
      
      * polish Doc.
      
      * polish Doc.
      
      * polish Doc.
      
      * polish Doc.
      
      * polish code and make the code robust.
      
      * Modify the code format.
      29f65225