You need to sign in or sign up before continuing.
  1. 23 2月, 2021 1 次提交
  2. 19 2月, 2021 1 次提交
    • H
      [Cherry-pick][Dy2stat] Add Support for Tuple in Loop and Refine Error Message (#31036) · 9ad9f357
      Huihuang Zheng 提交于
      * Add Support for Tuple in for Loop (#30998)
      
      Dy2stat didn't support tuple as iteration variable in the past. This PR added there main cases:
      
             1). Non-enumerate case: for var1, var2 in var|var.numpy() will be re-written as:
                for FOR_ITER_TUPLE_PREFIX_x in var | var.numpy():
                  var1 = FOR_ITER_TUPLE_PREFIX_x[0]
                  var2 = FOR_ITER_TUPLE_PREFIX_x[1]
              2). Enumerate out tuple case: for t in enumerate(var|var.numpy) will be rewritten as:
                for FOR_ITER_TUPLE_INDEX_PREFIX_x, FOR_ITER_TUPLE_PREFIX_x in enumerate(var|var.numpy):
                  t = (FOR_ITER_TUPLE_INDEX_PREFIX_x, FOR_ITER_TUPLE_PREFIX_x)
              3). Enumerate inner tuple case: for i, (var1, (var2, va3)) in enumerate(var|var.numpy()) will
              be re-written as:
                for i, FOR_ITER_TUPLE_PREFIX_x in var | var.numpy():
                  var1 = FOR_ITER_TUPLE_PREFIX_x[0]
                  var2 = FOR_ITER_TUPLE_PREFIX_x[1][0]
                  var3 = FOR_ITER_TUPLE_PREFIX_x[1][1]
      
      * Refine fake_interface Error Message (#30981)
      
      Refine fake_interface Error Message
      9ad9f357
  3. 20 1月, 2021 1 次提交
  4. 14 1月, 2021 1 次提交
  5. 11 1月, 2021 3 次提交
  6. 08 1月, 2021 1 次提交
    • L
      [cherry-pick] [Dy2Stat] Don't convert to paddle.shape if var_x.shape is not... · 2ba9bdd7
      liym27 提交于
      [cherry-pick] [Dy2Stat] Don't convert to paddle.shape if var_x.shape is not negetive #29965 (#30235)
      
      * [Cherry-Pick 2.0] [Dy2Stat] Don't convert to paddle.shape if var_x.shape is not negetive (#29965)
      
      1. When x is Variable, call nn.shape(x) only in following cases:
       1)The shape of x is used in control flow condition.
       2)The dim to be used is negetive
      2. When x is Variable, but x.shape or x.shape[idx] doesn't contain negetive value, don't convert to paddle.shape()
      
      * [Cherry-Pick 2.0] [Dy2Stat] Use Paddle2.0 api paddle.tensor.array_* (#30156)
      2ba9bdd7
  7. 05 1月, 2021 1 次提交
    • L
      [Cherry-pick 2.0] cherry pick 3 PRs about Dynamic-to-Static (#30100) · faeee3c3
      liym27 提交于
      * [cherry-pick 2.0] Fix unitest test_slice (#29740)
      
      Before this commit, test_slice use old api `dygraph_to_static_func` to use Dynamic-t-Static and use Executor explicitly,which is not recommended to users.
      After fixed, use recommended API `paddle.jit.to_static` to replace `dygraph_to_static_func`, which won't trigger the random exception on coverage CI.
      
      * [cherry-pick 2.0][Dy2Stat] Support grammar: for ele in var[idx] (#29541)
      
      Support to transformfor ele in var stms in which var is a slice of Tensor.
      
      * [cherry-pick 2.0][Dy2Stat] Fix bug for loop: a variable is used and created in loop, but used before created (#29769)
      faeee3c3
  8. 28 12月, 2020 2 次提交
    • L
      [Cherry-Pick 2.0][Dy2Stat] 1. Fix bug of for-range stmts. 2. Support that step... · a8b6dd86
      liym27 提交于
      [Cherry-Pick 2.0][Dy2Stat] 1. Fix bug of for-range stmts. 2. Support that step value is negative in for-range stmts (#29519) (#29874)
      
      1. Fix error in _build_cond_stmt of for-range stmts.
      
      2. Support that step value is negative in for-range stmts
      
      3. Fix code because of the diff between Py2 and Py3
      a8b6dd86
    • H
      [Cherry-pick] Cherry-pick of PR#29579 and PR#29617 (#29904) · 63939597
      Huihuang Zheng 提交于
      * [Dy2stat] Enable jit.save to Save Without Running (#29579)
      
      Enable jit.save to Save Without Running.
      
      * Modify CublasHandleHolder to Fix Random Unittest Failure. test=develop (#29617)
      
      Modify CublasHandleHolder from using PADDLE_ENFORCE_CUDA_SUCCESS to PADDLE_RETRY_CUDA_SUCCESS to fix random unittest failure. We checked that the unittest log showed CUDA allocation error at this file, which may due to GPU not enough. We fixed similar failure in the past, so we applied PADDLE_RETRY_CUDA_SUCCESS here.
      63939597
  9. 04 12月, 2020 3 次提交
  10. 03 12月, 2020 1 次提交
  11. 30 11月, 2020 1 次提交
    • W
      save model after jit.load (#28748) · 1476e1f9
      WeiXin 提交于
      * Changed a variable name error
      
      * Add comments
      
      * Move member functions of TranslatedLayer out of function
      
      * edit code according to review
      
      * Edit input argument of '_run_static_graph'
      
      * reset due to Segmentation fault
      
      * rename variables when stitching graph
      
      * modify code according CI
      
      * Add comments to '__i_m_p_l__'
      
      * remove blanks befor 'Get...'
      
      * edit code according to review
      
      * Add a comment to '_execution_method_creator'
      
      * Edit a comment to '_execution_method_creator'
      1476e1f9
  12. 28 11月, 2020 2 次提交
  13. 27 11月, 2020 1 次提交
  14. 25 11月, 2020 1 次提交
  15. 24 11月, 2020 3 次提交
  16. 19 11月, 2020 4 次提交
  17. 17 11月, 2020 1 次提交
  18. 11 11月, 2020 2 次提交
  19. 10 11月, 2020 1 次提交
  20. 05 11月, 2020 1 次提交
  21. 27 10月, 2020 1 次提交
  22. 26 10月, 2020 1 次提交
  23. 22 10月, 2020 1 次提交
  24. 20 10月, 2020 1 次提交
  25. 17 10月, 2020 1 次提交
  26. 16 10月, 2020 2 次提交
    • G
      Incorporate cudnn_lstm into LSTM api (#27217) · fa9d3fa5
      Guo Sheng 提交于
      * Incorporate cudnn_lstm into LSTM api.
      test=develop
      
      * Make coalesce_tensor support alignment optionally.
      test=develop
      
      * Reorganize RNN apis. test=develop
      
      * Fix cudnn rnn layout conversion.
      test=develop
      
      * Add sequence_length support for RNN cudnn implement.
      Add optional init_h and init_c gradient for cudnn_lstm_op.
      test=develop
      
      * Use create_parameter for rnn cudnn impl.
      test=develop
      
      * Move `self._flat_weight = self.create_parameter()` in RNNBase to main_program.
      test=develop
      
      * Update RNN api unittest to use set_device.
      test=develop
      
      * Fix set_place for unit tests of RNN apis.
      test=develop
      
      * Fix use_align in coalesce_tensor_op.
      test=develop
      
      * Adjust RNN apis arguments according to comments.
      test=develop
      
      * Polish documents for SimpleRNN apis.
      test=develop
      
      * Refine random seed in cudnn_lstm_op.
      Expose rnn params from sublayers to RNN.
      test=develop
      
      * Fix RNN saving for jit.save.
      Refine cudnn_lstm dropout behavior.
      test=develop
      
      * Fix doc of GRU. test=develop
      
      * Use ShareDataWith to avoid copying for cudnn_lstm_op test.
      test=develop
      
      * Remove updates on cudnn_lstm temporarily.
      test=develop
      
      * Use ShareDataWith to avoid copying for cudnn_lstm_op test.
      test=develop
      
      * Refine random seed in cudnn_lstm_op.
      test=develop
      
      * Fix test_lstm by adjust ConcreteProgram buffer getter.
      test=develop
      
      * Use create_parameter instead of create_var for rnn._flat_weight for static graph usage.
      test=develop
      
      * Remove W input for cudnn_lstm to pass unused_var_check.
      test=develop
      
      * Add test_predict for RNN unit tests coverage.
      test=develop
      
      * Fix code style of rnn.
      test=develop
      
      * Fix F.rnn usage in rnn.py.
      test=develop
      fa9d3fa5
    • A
      [Dy2Stat] Fix Error when generating train_program in eval mode (#27975) · ffcc1175
      Aurelius84 提交于
      * Fix save in eval mode
      
      * remove assert statement
      
      * fix test_partial_program failed
      
      * add more test
      
      * modify back into _train_program
      ffcc1175
  27. 14 10月, 2020 1 次提交
    • C
      Remove and reorganize the alias of APIs (#27717) · d05058d2
      chentianyu03 提交于
      * modify cond while_loop to paddle.static.nn.cond
      
      * modify crop_tensor to paddle.crop
      
      * modify Variable to paddle.static.Variable
      
      * remove nn.beam_search, nn.beam_search_decode, nn.gather_tree
      
      * remove bpr_loss, center_loss, rank_loss, smooth_l1, teacher_student_sigmoid_loss, edit_distance, sampled_softmax_with_cross_entropy in nn.functional
      
      * remove apis in nn.functional.learn_rate.py
      
      * remove pool2d, pool3d, adaptive_pool2d, adaptive_pool3d in nn.functional
      
      * remove apis in nn.functional.vision
      
      * remove erf, soft_relu in nn.functional.activation
      
      * remove apis in nn.functional.extension
      
      * remove nn.functional.rnn
      
      * remove hash from nn.functional.lod
      
      * remove row_conv from nn.functional.extension
      
      * remove one_hot, pad2d, pad_constant_like from nn.functional.common
      
      * remove nn.gather_tree, nn.BilinearTensorProduct, nn.Pool2D, nn.Pad2D
      
      * remove apis from optimizer.__init
      
      * remove tensor.creation.fill_constant
      
      * remove elementwise_mul in nn.functional.common and  modify to paddle.multiply
      
      * remove  tensor.stat.reduce_mean
      
      * remove reduce_all, reduce_any in tensor.logic
      
      * remove apis in tensor.math
      
      * remove apis in tensor.__init__
      
      * remove has_inf, has_nan in tensor.search
      
      * remove apis in framework.__init__
      
      * remove apis in paddle.__init__
      
      * remove apis in nn.functional.__init__
      
      * modify removed alias apis to raw api in doc and unittests
      
      * fix remove grid_sample bug
      
      * modify removed alias apis to raw api in doc and unittests
      
      * modify removed alias apis to raw api in doc and unittests
      
      * modify removed alias apis to raw api in doc and unittests
      
      * modify removed alias apis to raw api in doc and unittests
      
      * modify removed alias apis to raw api in doc and unittests
      
      * modify removed alias apis to raw api in doc and unittests
      
      * delete alias api relastions in doc
      
      * reserve paddle.compat, paddle.sysconfig
      
      * remove unittest for paddle.reduce_all, paddle.reduce_any
      
      * modify removed alias apis to raw api in doc and unittests
      
      * recover paddle.save and paddle.load
      
      * resolve conflicts
      
      * fix sample code missing paddle.enable_static() bug
      
      * fix sample code missing paddle.enable_static() bug
      
      * fix to_string sample code error
      d05058d2