1. 20 10月, 2021 1 次提交
    • S
      Add FasterTokenizer Operator (#34491) · 3f2d6a3f
      Steffy-zxf 提交于
      Add Tokenizer related functionalities for Transformer model in order that the process of training and predicting is consistent.
      
      * support the text string as an input Tensor
      * support the "VOCAB"unordered_map<wstring, int> as an input Tensor to lookup tokens
      * Tokenizer used for BERT. This tokenizer applies an end-to-end, text string to wordpiece tokenization.
      * It first applies basic tokenization, followed by wordpiece tokenization.
      3f2d6a3f
  2. 13 10月, 2021 1 次提交
  3. 17 9月, 2021 1 次提交
    • Z
      [AMP] Support pure fp16 training mode for dygraph (#35521) · adaeee4d
      zhangbo9674 提交于
      * add pure fp16 major function in auto_cast & tracer
      
      * support master weight in dygraph for pure fp16
      
      * check mix dtype of fp16&fp32 for check_finite_and_unscale op
      
      * change pure fp16 funtion name
      
      * refine some bug in auto_cast
      
      * refine auto_cast interface logic
      
      * add param _casted_by_pure_fp16 for class Layer
      
      * support state_dict hook for save model by user appointed dtype in pure_fp16_decorator
      
      * refine pure_fp16_decorator as decorator
      
      * add unittest
      
      * add comment
      
      * add comment
      
      * support recompute
      
      * add comment for auto_cast and decorator
      
      * support to_static_state_dict for paddle.jit.save
      
      * unlimite models num and optimizers num
      
      * add lookup_table in black_list
      
      * fix momentum and layer state_dict
      
      * fix bug in layer state_dict
      
      * fix bug in layer state_dict_helper
      
      * refine unittest
      
      * refine test_momentun_op
      
      * refine interface and some code
      
      * refine amp_decorator interface
      
      * refine pure fp16 interface
      
      * refine master weight interface
      adaeee4d
  4. 09 6月, 2021 1 次提交
  5. 18 5月, 2021 1 次提交
  6. 12 5月, 2021 1 次提交
  7. 19 4月, 2021 1 次提交
    • J
      Fix sublayer (#31824) · 4d69eeaa
      Jiabin Yang 提交于
      * fix sublayer error with include_sublayers=False
      
      * add ut
      
      * refactor include_sublayers related api
      
      * fix ut
      
      * fix ut of transformer
      
      * fix ut of transformer
      
      * remove useless code
      
      * change sublayer api
      
      * polish code
      
      * add test for include_self=True
      4d69eeaa
  8. 13 4月, 2021 1 次提交
    • C
      add layer.to api (#32040) · 6e946e9d
      chentianyu03 提交于
      * add layer.to api
      
      * add layer.to api
      
      * add layer.to api
      
      * add the doc for Layer.to
      
      * add input type checking
      
      * modify assert and import bug
      
      * format code style
      
      * format code style
      
      * make place support str type
      
      * add SetGradVarBase method to set the gradient after conversion
      
      * modify argument palce to device
      
      * modify argument palce to device
      
      * modify doc of layers.to API
      
      * add xpuplace to device argument
      6e946e9d
  9. 02 4月, 2021 1 次提交
    • W
      support save/load single tensor (#31756) · 43367e4b
      WeiXin 提交于
      * support save/load single tensor
      
      * compatibility modification according to unnittest
      
      * Some python2.7 don't have 'copyreg' modules
      
      * Handle a syntax error.
      
      * Dealing with compatibility problems on Mac.
      
      * Dealing with compatibility problems on Mac.
      
      * edit unittest to improve coverage.
      
      * Modify the code according to the review comments
      
      * Reduce redundant code.
      
      * support for static graph loading dygraph state_dict
      
      * edit code according to CI
      
      * edit unittest
      
      * edit unnittest
      
      * delete redundant file
      
      * edit code according to Comments
      
      * edit english doc
      
      * edit english doc
      
      * edit English DOC.
      
      * get/set_tensor->get/set_value; return_numpy=False
      
      * get/set_tensor->get/set_value; return_numpy=False
      
      * edit unnittest
      
      * edit unnittest
      
      * polish code.
      43367e4b
  10. 01 4月, 2021 1 次提交
  11. 05 2月, 2021 1 次提交
  12. 20 1月, 2021 1 次提交
  13. 06 1月, 2021 1 次提交
  14. 28 12月, 2020 1 次提交
  15. 11 12月, 2020 1 次提交
  16. 09 12月, 2020 1 次提交
  17. 02 12月, 2020 1 次提交
    • H
      [Dy2stat] Fix PaddleGan Deoldify Model Dy2stat Problems (#29226) · aec05d81
      Huihuang Zheng 提交于
      This PR fixes several problems in dy2stat for Deoldify model in PaddleGan.
      
      In model, software engineer wrote if x.shape == y.shape, the Tenser shape is a tuple in dygraph so the == returns True/False, but in static graph the == becomes element-wise comparison, which is a different behavior. In this PR we reduce the element-wise comparison result.
      
      If software engineer write computations which uses parameters in hooks, the static graph can loss the parameter variable because we put param_guard at forward of a Layer. In this PR we made param_guard cover pre-hook and post-hook.
      
      In PaddleGan, software engineer calculated some parameter values in __init__ by running some dygraph code. Those code also run during dy2stat. So some variables may be assign as a VarBase (Tensor) first and then Variable, which raised an error. We fixed the bug in this PR by handling the case.
      
      TODO: We just added testcase for the 1. shape comparison. Should add test case for 2. and 3. But since we are chasing 2.0RC, I will do it in the near future PR
      aec05d81
  18. 24 11月, 2020 1 次提交
    • W
      fix eng doc for some api (#28477) · 887a3511
      wanghuancoder 提交于
      * fix eng doc, test=develop
      
      * add import deprecated for layers, test=develop
      
      * add block line for doc generate, test=develop
      
      * remove todo for create_variable, test=develop
      
      * add blank line for doc generate, test=develop
      
      * add blank line for doc generate, test=develop
      887a3511
  19. 02 11月, 2020 1 次提交
  20. 21 10月, 2020 1 次提交
    • C
      2.0rc api rename (#28088) · 7c1aa0d6
      cnn 提交于
      * rename manual_seed to seed
      
      * rename xxx1d-->xxx1D, xxx2d-->xxx2D, xxx3d-->xxx3D
      
      * rename manual_seed --> seed
      
      * do not rename .cc, .cu and .h file
      
      * rename manual_seed --> seed
      
      * rename manual_seed --> seed
      
      * rename manual_seed --> seed
      
      * rename manual_seed --> seed
      
      * disable_static on doc example code
      
      * donot change manual_seed on generator
      
      * add enable_static on sample code
      
      * convert python/paddle/fluid/layers/nn.py to bak
      
      * fix typo
      
      * fix code style
      
      * fix seed to manual_seed when call functions of Generator()
      
      * fix bug
      7c1aa0d6
  21. 08 10月, 2020 1 次提交
    • W
      modify doc for paddle.nn.Layer (#27624) · 7698e199
      wanghuancoder 提交于
      * modify doc for Layer, test=develop
      
      * modify doc for Layer2, test=develop
      
      * set dtype default value to float32, test=develop
      
      * add example code for paddle.nn.Layer, test=develop
      
      * set create_parameter and create_variable dtype default value to None, test=develop
      
      * modify some example code, tet=develop
      
      * refine, test=develop
      
      * del no ues code, test=develop
      
      * modify doc, example code, args, test=develop
      
      * modify doc, test=develop
      7698e199
  22. 23 9月, 2020 1 次提交
    • C
      Add new paddle.save/load APIs (#27331) · bb84f0e6
      Chen Weihang 提交于
      * init commit of new save/load
      
      * fix failed unittests
      
      * fix save_load_v2 unittest failed
      
      * fix failed unittest & polish doc
      
      * add tests for coverage
      
      * add more tests & move static apis
      
      * fix example code error
      
      * polish emample code
      
      * fix detail example code problem
      bb84f0e6
  23. 22 9月, 2020 1 次提交
  24. 03 9月, 2020 1 次提交
    • C
      Update set_dict method name & add aliases (#26700) · 9cb57f94
      Chen Weihang 提交于
      * update set_dict method name & add aliases
      
      * fix var name error
      
      * fix alias formats
      
      * use set_state_dict in unittest
      
      * add decorator solve compatible problem
      
      * polish decorator
      
      * replace layer set_state_dict by patched method
      
      * remove import monkey path layer
      
      * fix import function error
      
      * add unittest for coverage
      9cb57f94
  25. 20 8月, 2020 1 次提交
  26. 18 8月, 2020 1 次提交
  27. 16 8月, 2020 1 次提交
  28. 11 8月, 2020 1 次提交
    • P
      Paddle-2.0 API directory migration (#25898) · 2efcb481
      pangyoki 提交于
      * Directory migration, test=develop
      
      * Change imperative from paddle init to paddle framework, test=develop
      
      * Fixed jit bug, test=develop
      
      * default static mode, test=develop
      
      * fixed format and create parameter belongs to framework, test=develop
      
      * Fixed import package, test=develop
      
      * fix __init__ format, test=develop
      
      * fixed alias problem
      
      * fixed paddle.enable_imperative problems, test=develop
      
      * Add unittest
      
      * delete install_check comment
      
      * Fixed unittest timeout
      
      * fixed unittest error
      
      * move Program default_xx_program to static package
      
      * optimize unittest method
      
      * fixed framework __init__ format
      
      * fixed jit path
      
      * delete alias
      
      * move jit to paddle
      
      * Fixed unittest format
      
      * fixed paddle.default_main_program
      
      * Fixed save load API in paddle __init__.py
      
      * fixed ci paddle.imperative.to_variable
      2efcb481
  29. 05 8月, 2020 1 次提交
  30. 24 7月, 2020 1 次提交
    • Q
      Refine Model of high level API (#25559) · b5f8784c
      qingqing01 提交于
      * Refine Model
      
      1. Take the network (instance of Layer) as the input of Model.
      2. Refine set_dict/load_dict of Layer.
      3. Refine Input interface, so update code sample about Input
      b5f8784c
  31. 03 7月, 2020 1 次提交
  32. 29 6月, 2020 1 次提交
    • A
      [Dy2stat]Support buffers and register_buffer in Layer (#24888) · 02adf68d
      Aurelius84 提交于
      * support to save varBase created in __init__ test=develop
      
      * polish code test=develop
      
      * refine to_static_var test=develop
      
      * refine warning test=develop
      
      * add unitteset for to_static_var test=develop
      
      * fix logger test=develop
      
      * polish buffers en doc test=develop
      
      * fix param_guard test=develop
      
      * refine en doc test=develop
      02adf68d
  33. 14 5月, 2020 1 次提交
  34. 08 5月, 2020 1 次提交
  35. 09 4月, 2020 1 次提交
    • S
      support Layer level train/eval mode (#22463) · b11340a4
      songyouwei 提交于
      * Layer add training attr, add Dropout Layer
      
      * add unit test for Dropout
      test=develop
      
      * minor fix
      test=develop
      
      * add missing args
      test=develop
      
      * support global flag in dropout, add docs
      test=develop
      
      * minor fix
      test=develop
      
      * minor fix
      test=develop
      
      * refine code comments
      test=develop
      
      * refine Dropout
      test=develop
      
      * fix ut
      test=develop
      
      * arg expansion
      test=develop
      
      * sample code update
      test=develop
      
      * prop -> p
      test=develop
      
      * fix ut
      test=develop
      
      * minor check fix
      test=develop
      b11340a4
  36. 07 4月, 2020 1 次提交
  37. 03 4月, 2020 1 次提交
    • Z
      support forward hook for dygraph (#22443) · 166a1ae9
      zhongpu 提交于
      * support forward hook for dygraph, test=develop
      
      * add optest for forward_hook in dygraph, test=develop
      
      * add optest, test=develop
      
      * polish code, test=develop
      
      * add sample code, test=develop
      
      * rename forwrd_hook to forward_post_hook, test=develop
      
      * fix the api description, test=develop
      
      * fix api description, test=develop
      166a1ae9
  38. 17 2月, 2020 1 次提交
  39. 17 1月, 2020 1 次提交
  40. 09 1月, 2020 1 次提交
    • S
      named_sublayers and named_parameters (#21868) · 83037e55
      songyouwei 提交于
      * use snake_cased Layer name
      
      * add named_parameters and named_sublayers api
      
      * add include_sublayers param, add unittest
      test=develop
      
      * fix named unittests
      test=develop
      
      * fix unittest
      test=develop
      
      * add api docs
      test=develop
      
      * arg fix
      test=develop
      
      * reserve rnn_impl name_scope for static graph
      test=develop
      
      * fix load static param
      test=develop
      
      * fix load static param
      test=develop
      83037e55