Huihuang Zheng
81c4def96a
[Dy2stat] Rename Dygraph To Static Decorators ( #23880 )
...
1. Rename Dygraph To Static Decorators to declarative
2. dygraph_to_static_func is still using in some training tests, I cannot delete it now.
3. Add some API docs
6 years ago
liym27
37ef7c1351
[dy2static]Fix a bug of is_dygraph_api and move BasicApiTransformer to a separate file( #23923 )
...
* Move BasicApiTransformer to a separate file. test=develop
* Fix a bug: A api in module is not a real dygraph api in dygraph_to_static. test=develop
6 years ago
Chen Weihang
fccbc485f5
remove redundant visit func, test=develop ( #23877 )
6 years ago
Chen Weihang
5b97b8556e
remove train eval set in static runner, test=develop ( #23834 )
6 years ago
songyouwei
8f63a3ecff
fix no_grad argspec ( #23790 )
...
test=develop
6 years ago
Xing Wu
840ac2b302
Cudnn rnn layers api ( #23390 )
...
* add cudnn compatiable rnn cell api for dygraph
* update sample code
* update some typos
* fix specify name in param_attr problem
* add pre-commit check
* remove duplicate import, test=develop
* add unittest coverage, test=develop
* make code more tight, test=develop
* cudnn_compatibale -> use_cudnn_impl, test=develop
* change api name, test=develop
6 years ago
zhongpu
2beb6eacba
fix if logic in dygraph ( #23728 )
...
* fix if logic in dygraph, test=develop
* fix bug, test=develop
6 years ago
Aurelius84
d265b16aed
Support transform two independent functions in dygraph_to_static_output ( #23652 )
...
* Spport transform two independed function in dygraph_to_static_output test=develop
* fix unittest error test=develop
6 years ago
Chen Weihang
a2315d37cf
remove logging setting, test=develop ( #23715 )
6 years ago
songyouwei
0307393721
API(PRelu) error message enhancement ( #23539 )
...
* err msg enhance for PRelu
* add ut
test=develop
6 years ago
songyouwei
cae9340ec8
API(GRUUnit) error message enhancement ( #23535 )
...
* err msg enhance for GRUUnit
* add ut
test=develop
6 years ago
songyouwei
475de6da22
API(Embedding) error message enhancement ( #23533 )
...
* err msg enhance for Embedding
* add ut
test=develop
6 years ago
songyouwei
dc1901f48e
API(BilinearTensorProduct) error message enhancement ( #23528 )
...
* err msg enhance for BilinearTensorProduct
test=develop
* rebase dev
test=develop
* add ut
test=develop
6 years ago
Aurelius84
d1f9a26c95
Refine mechanism of calling outer function in dy2static ( #23688 )
...
* Refine mechanism of calling outer function test=develop
* fix typo test=develop
6 years ago
songyouwei
4d0efee4f4
Linear revert to matmul op ( #23654 )
...
test=develop
6 years ago
silingtong123
f9e2a27963
error message of SpectralNorm OP enhancement ( #23516 )
6 years ago
zhongpu
076dcdfde9
add instance_norm op for dygraph ( #23362 )
...
* add instance_norm op for dygraph, test=develop
* add error message, test=develop
6 years ago
songyouwei
cb36478a36
add LayerList insert and extend ( #23377 )
...
* add LayerList insert and extend
test=develop
* add index range check
test=develop
* add sample codes
test=develop
* refine sample code
test=develop
6 years ago
Zhou Wei
1f83069117
API(to_variable/save_dygraph) error message enhancement( #23683 )
...
* API(to_variable/save_dygraph) error message enhancement
6 years ago
zhongpu
60d1f98a7d
error message enhancement for Pool2D, test=develop ( #23607 )
6 years ago
liym27
f9c9d50e7e
Return VarBase of ProgramTranslator.get_output instead of numpy.ndarray. test=develop ( #23663 )
6 years ago
zhongpu
01a78323a7
API/OP (Conv2DTranspose) error message enhancement ( #23590 )
...
* error message enhancement for Conv2DTranspose, test=develop
* fix error_message, test=develop
6 years ago
Leo Chen
795a0a9ab4
fix a typo, test=develop ( #23685 )
6 years ago
silingtong123
cec234b1aa
test=develop, error message of tree_conv OP enhancement ( #23574 )
6 years ago
silingtong123
7277df47bb
error message of NCE API enhancement ( #23544 )
...
* error message of NCE API enhancement
6 years ago
songyouwei
a1a95f8108
fix no_grad signature ( #23600 )
...
* fix no_grad signature
test=develop
* check func name instead of doc
test=develop
6 years ago
zhongpu
d40c52403d
error message enhancement for Linear, test=develop ( #23595 )
6 years ago
zhongpu
c1c8c7e431
error message enhancement for Conv2D, test=develop ( #23561 )
6 years ago
songyouwei
b11340a437
support Layer level train/eval mode ( #22463 )
...
* 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
6 years ago
Aurelius84
d37cd74033
Polish set_optimizer Interface ( #23588 )
6 years ago
Chen Weihang
f301eb7f34
api dygraph layer norm input check, test=develop ( #23534 )
6 years ago
Feiyu Chan
078dd05b73
add Conv2D/Conv2DTranspose/Conv3D/Conv3DTranspose in paddle.nn.layer ( #23488 )
...
* add Conv/ConvTranspose layers in paddle.nn.layer, test=develop
* add example code in docstring, test=develop
* update unittests to work with test_runner, test=develop
6 years ago
songyouwei
c435110a3f
support no_grad inplace operating ( #22522 )
...
* support no_grad atomic operating
test=develop
* rm create param api
test=develop
* refine sample code
test=develop
* clean impl
test=develop
6 years ago
Chen Weihang
d349a622f0
api dygraph batch norm type check, test=develop ( #23525 )
6 years ago
zhongpu
8d95a10906
fix if logic in dygraph, test=develop ( #23512 )
6 years ago
zhongpu
ea6a251c0b
fix sample code, test=develop ( #23448 )
6 years ago
Chen Weihang
75bd350710
Implement StaticModelRunner to support dygraph fine-tune static graph pre-training model ( #23171 )
...
* static model runner basic implement, test=develop
* add run program op to execute loaded program, test=develop
* refactor static model runner & run program op, test=develop
* reset engine.cc to resolve conflict
* adapt the change of dygraph double grad, test=develop
* refactor impl to solve control flow error, test=develop
* clear debug code, test=develop
* fix ci str compatible error & checkout dygraph grad maker & add example, test=develop
* hide api & add op test, test=develop
* fix run program op test places error, test=develop
* fix program by review comment, test=develop
* delete change var desc name, test=develop
* fix other program by review comment, test=develop
* remove _static_graph_guard, test=develop
* add selectedrows test, test=develop
* remove desc parser, test=develop
* fix detail program, test=develop
* change socpe create & add test, test=develop
6 years ago
Huihuang Zheng
036121b731
[Dy2stat] Make loop_transformer supports class variable ( #23478 )
...
This CR makes two changes:
1. In old loop_transformer, if a class variable, such as "self.a, foo.bar" is a loop var, the Dy2stat will fail because `def func(self.foo)` is not legal syntax. We support class variable by renaming.
2. After https://github.com/PaddlePaddle/Paddle/pull/22892 is merged, we can support `while x < 10` in dygraph. I enable those tests in corresponding Dy2stat
6 years ago
Aurelius84
4955c97ee8
Add unitTest for `Tensor==constant` for ifElse in dygraph2static ( #23407 )
...
* Add unitTest for `Tensor==constant` for ifElse in dygraph2static test=develop
6 years ago
zhongpu
7ca836d3da
support if logic for Variable in dygraph ( #22892 )
...
* support if logic for Variable in dygraph, test=develop
* fix test_learning_rate_scheduler.py, test=develop
* fix optest, test=develop
* fix error message, test=develop
* fix optest,test=develop
* fix comment, test=develop
6 years ago
zhongpu
166a1ae902
support forward hook for dygraph ( #22443 )
...
* 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
6 years ago
Huihuang Zheng
1d4d89baf8
[Dy2stat] Add data_layer_not_check ( #23351 )
...
1. Add data_layer_not_check because it is needed in dygraph_to_static where input can be variable size
2. Remove warnings in static analysis because python cannot do exact static analysis
6 years ago
Huihuang Zheng
8814853d82
Remove Read-Only Basic Type Variable in loop_vars ( #23299 )
...
* Remove Read-Only Basic Type Variable in loop_vars
test=develop
* Put class support in loop for future thing
test=develop
* Modify based on reviewer's comment
test=develop
6 years ago
hong
420944e514
enhance load dygraph; test=develop ( #23167 )
6 years ago
Leo Chen
488b2387e2
Feature/expand params in auto-generated pybind functions for dygraph operators ( #23181 )
...
* expand parameters, test=develop
* support resnet, test=develop
* fix resnet, test=develop
* support duplicable out, test=develop
* support ptb
* fix bugs, test=develop
* support null input, test=develop
* fix bugs, test=develop
* fix batchNorm is_test, test=develop
* refine code, test=develop
* follow comments, test=develop
* follow comments, test=develop
* follow comments, test=develop
* follow comments, test=develop
6 years ago
Aurelius84
9474d140de
Support Parameter type determination in StaticAnalysis ( #23302 )
...
* Support Parameter type determination test=develop
6 years ago
zhongpu
dc24f38a9f
support math operator for variable ( #23063 )
...
* support math operator for variable, test=develop
* polish code, test=develop
* polish code, test=develop
6 years ago
Aurelius84
f8205ffa82
fix conflict var bug in loop_transformer test=develop ( #23287 )
6 years ago
Aurelius84
16e74f1185
fix is_controw_flow bug with `if Tensor.numpy()` ( #23251 )
6 years ago
Zeng Jinle
8bfd62ffb7
Expose dygraph.grad api ( #23124 )
...
* expose dygraph.grad api, test=develop, test=document_fix
* add more parameter in dygraph.grad API, test=develop
* add only_inputs=True parameter, test=develop
* follow comments, test=develop, test=document_fix
* fix typo, test=develop, test=document_fix
6 years ago
Huihuang Zheng
e5af90aa28
Add Decorator 'dygraph_to_static_program' and ProgramTranslator.save_inference_model ( #23227 )
...
1. Add Decorator 'dygraph_to_static_program'
2. Add corresponding ProgramTranslator.get_program
3. Add ProgramTranslator.save_inference_model
4. Modified some warning information of dy2stat
5. Change program cache to contain startup_program because for users who gets program to run, they may like to initialize startup program
6 years ago
Aurelius84
a647bcd355
Add convert_function_with_cache in dygraph_to_static_func ( #23190 )
...
* add unittest test=develop
* add function cache test=develop
6 years ago
Aurelius84
d6f72c4fcc
Add parameter(learning_rate) in NoamDecay ( #23156 )
...
* Add parameter(learning_rate) in NoamDecay test=develop
6 years ago
liym27
af92630666
fix bug of loop_vars in loop_transformer.test=develop ( #23180 )
6 years ago
liym27
ebe4eab985
fix bug of ListTransformer in dygraph_to_static. test=develop ( #23153 )
6 years ago
Huihuang Zheng
e9b18c7402
Rename Decorator "dygraph_to_static_graph" to "dygraph_to_static_func" ( #23150 )
...
This PR does exact the thing as the title. The reason is that we plan to develop 4 decorators
"dygraph_to_static_code"
"dygraph_to_static_program"
"dygraph_to_static_func"
"dygraph_to_static_output"
The 4 decorators will emphasize different part when translating dygraph to static graph. Decorator name "dygraph_to_static_graph" is too big for the function it implements.
6 years ago
Huihuang Zheng
05c00af5f1
Add dygraph_to_static_code and get_code in ProgramTranslator ( #23162 )
...
As the title, we add decorator "dygraph_to_static_code", and add related "get_code", "get_func", "get_output" for ProgramTranslator. Next step will be adding "dygraph_to_static_program"
6 years ago
songyouwei
2787041246
bug fix ( #23193 )
...
test=develop
6 years ago
liym27
11f94cdce9
Improve function is_control_flow_to_transform. test=develop ( #23109 )
6 years ago
liym27
573d2faacd
fix bug in function `is_to_variable`. test=develop ( #23147 )
6 years ago
Huihuang Zheng
6fc6bb3e78
Refactoring Program Cache Related Code ( #23118 )
...
1. Rename AutoTracer to ProgramTranslator
2. Rename cached_program to program_cache
3. Remove some functor style __call__
4. Dict key should be string but not hash code of string
6 years ago
Zeng Jinle
a31d7328b7
Add dygraph double grad implementation ( #22939 )
...
* add double grad implementation for dygraph, test=develop
* polish code, add uts, test=develop
* fix place bug, test=develop
* polish codes, add more uts for coverages, test=develop
* add no_grad_set, test=develop
* add star gan ut, test=develop
* follow comments, test=develop
6 years ago
Huihuang Zheng
d066d6f994
[Dy2Stat] Change layers.data to fluid.data and Test Var Created In Loop ( #23103 )
...
As the title
6 years ago
songyouwei
2e2da7124b
high-performance dygraph slice ( #22879 )
...
* move __getitem__ to cpp
* bug fix
* add type check and gil release
* support negative step with omitted ends
test=develop
* code refine
test=develop
* bug fix
test=develop
* slice always return different pyobj
test=develop
6 years ago
Aurelius84
26bc953b3f
Fix returned arguments in IfElse_fn test=develop ( #23102 )
6 years ago
Aurelius84
31fc3ab79a
Support to use external function ( #23057 )
...
* Support to use external function test=develop
* refine the parms of ast_to_func test=develop
6 years ago
Huihuang Zheng
fb7b008acc
Add Support for Break and Continue in Dygraph to Static ( #23067 )
...
1. Add support for Break and Continue in Dygraph to Static
2. Also add support for gast.Not in NodeTestTransformer
3. Also add support for logical op transformation in LoopTransformer
6 years ago
liym27
5a202af90b
Support slice write in dygraph_to_static. test=develop ( #23055 )
6 years ago
Aurelius84
2403362d06
BugFix for parsing Arguments and inserting funcs in IfElseTransormer ( #23035 )
...
* Support and/or in controlFlow if test=develop
6 years ago
liym27
4af491c2bb
Tensor.shape support control flow if/for/while and bugfix ( #22866 )
...
* Support Tensor.shape in control flow if/for/while and separate TensorShapeTransformer from BasicApiTransformer. test=develop
6 years ago
Aurelius84
ab473357a2
Support and/or in dygraph_to_static control_flow_if ( #22967 )
...
* Support and/or in controlFlow if test=develop
* Refine IsControlFlow interface test=develop
6 years ago
Chen Weihang
3dfaf44adc
Rename dygraph parallel env & add doc ( #22925 )
...
* add dygraph parallel env doc, test=develop
* polish details, test=develop, test=document_fix
* fix examples error in other apis, test=develop
* fix more example error in other api, test=develop
* add white list for gpu examples, test=develop, test=document_fix
6 years ago
liym27
08e80d170b
Support list in control flow for dygraph_to_static ( #22902 )
...
* support list in control flow if. test=develop
* support list in for/while and supplement tests. test=develop
6 years ago
Huihuang Zheng
d7a7c5f0bf
Support Simple For Range Loop in Dygraph to Static ( #22867 )
...
1. Add basic support for `for in range` loop
2. Move `test_dygraph_to_static_*` to `dygraph_to_static` dir and rename them
3. Add test case for dict in while_loop
6 years ago
Aurelius84
4ff2915d1f
Refine code of IfElseTransformer and rename unittest files ( #22930 )
...
+ Refine code structure and move code related with control flow `if` into `ifelse_transformer.py`
+ Merge code of `ast_utils.py` into `utils.py`
6 years ago
Aurelius84
ba65e4ebef
support Tensor.shape in control_flow_if test=develop ( #22916 )
6 years ago
Zeng Jinle
d33c4343e1
Imperative tracer refactoring ( #22457 )
...
* refine grad maker, test=develop
* refactor tracer stage 1, test=develop
* merge develop to solve conflict third times, test=develop
6 years ago
liym27
b290420fc4
fix bug in the transformation from to_variable to assign. test=develop ( #22885 )
6 years ago
liym27
4ea95b6fe5
Support Tensor.shape in dygraph_to_static ( #22830 )
...
* support basic tensor.shape.
* Support tensor.shape with dependencies.
6 years ago
Huihuang Zheng
0d463d3bf7
Fix NameVisitor bugs ( #22847 )
...
1. copy.deepcopy in NameVisitor should be changed to copy.copy to make hash or set work
2. read_context should be type of gast.Load()/gast.AugLoad(), not gast.Load/gast.AugLoad
6 years ago
Huihuang Zheng
aca3f5311d
Support "while" in Dygraph to Static ( #22841 )
...
Add basic support for while in translating dygraph to static
1. Analysis the variable liveness in class NameVisitor
2. Replace while key word using while_loop API
6 years ago
Aurelius84
1217a52155
Modify the way of inserting newly defined func_nodes ( #22837 )
...
* Modify the way of inserting newly defined func_nodes test=develop
6 years ago
Aurelius84
a5036775a9
Add program_cache in dygrapht_to_static ( #22766 )
6 years ago
songyouwei
df87e79f54
Add functional dygraph mode api ( #22745 )
...
* functional dygraph enable/disable
test=develop
* use context manager instead
test=develop
* refine sample code
test=develop
* rename api & expose to fluid
test=develop
* fix sample code
test=develop
6 years ago
liym27
68a92e4674
fix dygraph_to_static_ouput and add a new decorator. ( #22785 )
...
* change dygraph_to_static_output to dygraph_to_static_graph. test=develop
* Remove duplicate code. test=develop
* Follow comments from Liujie. test=develop
* change dygraph_to_static_output to dygraph_to_static_graph. test=develop
6 years ago
liym27
8c381cd957
support fetch feed in dygraph to static graph ( #22767 )
...
* Support fetch and run program in the process of dygraph_to_static_output. test=develop
* fix to_source(gast) and remove dygraph API such as Conv2D, Linear. test=develop
6 years ago
Huihuang Zheng
66991218ec
Add Basic Function Return Type Analysis ( #22747 )
...
1. Considering functions, I have to change the node type from single value to a set. Because python function is allowed to return different types. The set represent all possible types
2. I added scope_name and scope_type for AstVarScope, because in python functions, variable may have different scope. For example:
```
a = 3
def foo(b):
a = 9
return a + b
```
the `a` in `foo` is different to the `a` out of `foo`. Similar to class field. The scope_name will help me to know the function name when static analysis finds a `return` sentence.
6 years ago
Aurelius84
dab5e5d8bc
Add IsControlFlowIfVisitor in ast_transformer ( #22709 )
...
* add is_control_flow_if test=develop
6 years ago
liym27
68c76793ca
support dygraph basic api transformed to static api ( #22678 )
...
* support dygraph to static graph for simple case.
* add test for dygraph API recognition. test=develop
* support basic to_variable api. test=develop
* update dict: dygraph_class_to_static_api
* add all tests of dygraph api. test=develop
* use gast/astor instead of ast/codegen for the compatibility of PY2 and PY3. test=develop
* add arg 'num_flatten_dims' for fc ast node. test=develop
* Modify names of class by Camel-Case.
6 years ago
tianshuo78520a
d2ba91aad1
fix typo words ( #22653 )
6 years ago
Leo Chen
d39d8bee4e
unexpose tracer, test=develop ( #22661 )
6 years ago
Aurelius84
08b09f6447
Support if/else in dygraph_to_static ( #22540 )
...
* support nested if/else
* support to derivate returns the parameter list automatically
* polish tranform function of slice
* fix modify x.numpy()[i] slice function
* support to transform ast.node into callable function
* fix get_name_ids bug and add more unittest test=develop
* fix requirements.txt test=develop
* remove useless import statement test=develop
* Fixed version compatibility issues in param of function test=develop
* use decorater to test ast_to_func test=develop
* add textwrap.dedent for source_code test=develop
* polish code comment
* fix compatibility with python2 and python3 test=develop
* fix gast version error test=develop
* fix gast repo test=develop
* polish transfer_from_node_type code test=develop
* add nested_if_else unittest test=develop
* split IfElseTransformer test=develop
* specify gast version test=develop
* fix ast_to_func root type test=develop
6 years ago
Huihuang Zheng
14672a6364
Add Basic Node Var Type Analysis ( #22603 )
...
1. Move AstNodeWrapper, StaticAnalysisVisitor to a new python file: static_analysis.py
2. Add basic node var type analysis
6 years ago
songyouwei
0aee43005a
Linear use mul op ( #22662 )
...
* Linear use mul op
test=develop
* fix unittest
test=develop
6 years ago
Aurelius84
8b41e2b3d1
add gast to replace ast test=develop ( #22630 )
6 years ago
songyouwei
d9f0c9f51c
support set param with None value ( #22418 )
...
* support reset param with None value
* add unittest
test=develop
* update unittest
test=develop
6 years ago
songyouwei
b768708e5d
fix pickle load encoding between python 2 and 3 ( #22621 )
...
test=develop
6 years ago
songyouwei
cb4560b79d
python 2 and 3 compatible pickle ( #22555 )
...
test=develop
6 years ago
Huihuang Zheng
a8dd425aa3
Add Static Analysis to Construct AstNodeWrapper ( #22569 )
...
As the title
6 years ago
Zeng Jinle
08033c8634
fix traced layer with non persistable vars, test=develop ( #22552 )
6 years ago
Huihuang Zheng
903039a3c6
Add Simple Framework for Transforming Dygraph to Static Graph ( #22491 )
...
This PR provides very basic and simple framework for transforming Dygraph to Static Graph.
API names, final outputs are not determined yet. Feel free to modify or add class/function/type when you think the framework is not extendable for you.
6 years ago
songyouwei
39bdefd875
open depthwise_conv2d in dygraph ( #22373 )
...
test=develop
6 years ago
songyouwei
99f5907e02
Fix layer & dygraph circular dependent ( #22334 )
...
* fix circular dependent
* try import layers.nn from dygraph
test=develop
6 years ago
songyouwei
4dec15999f
Allow Layer attr shadow ( #22333 )
...
* allow sublayer or param shadow attrs
* add unittest
test=develop
* change remove fn name
test=develop
6 years ago
hong
737334989b
State dict do not count data parallel layers ( #22169 )
...
* DataParallel state dict don't include _layers.; test=develop
* add unitest of data parallel; test=develop
* add load state test; test=develop
6 years ago
songyouwei
4bf2ccaa52
fix save_dygraph & save with nonexistent dir ( #22266 )
...
* fix save_dygraph with nonexistent dir
test=develop
* minor fix
test=develop
* fix unittest
test=develop
* fix static save
test=develop
6 years ago
songyouwei
83037e55ca
named_sublayers and named_parameters ( #21868 )
...
* 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
6 years ago
zhongpu
7d10edc5ee
add clear_gradients for Optimizer and add clear_gradients api description ( #21948 )
...
* add clear_gradients for Optimizer, add api description, test=develop
* fix optest for optimizer's clear_gradient interface, test=develop
* add sample code, test=develop
* polish sample code, test=develop
6 years ago
Leo Chen
51cb918a05
update layers used in transformer dygraph model, test=develop ( #22051 )
...
* update layers, test=develop
* update layers for resnet, test=develop
* fix is_test attr, test=develop
* update cycle_gan, test=develop
* update reinforcement_learning, test=develop
* update ocr, test=develop
* fix bug, test=develop
6 years ago
songyouwei
1ae3f47f59
update PRelu arg ( #21946 )
...
* update PRelu arg
test=develop
* fix unittests
test=develop
* fix element mode alpha shape
test=develop
* split channel_or_input_shape arg
test=develop
* fix unittest
test=develop
6 years ago
zhongpu
cf475f95df
Remove FC in dygraph, modify FC to Linear in sample code ( #22082 )
...
* modify fc to linear in sample code, test=develop
* remove FC, test=develop
* remove warnings, test=develop
* drop fluid/imperative/README.md , test=develop
* change fc to linear, test=develop
* polish code style, test=develop
6 years ago
songyouwei
d0406193e3
LayerList add sublayer none check ( #22135 )
...
test=develop
6 years ago
hong
2f49cf70f7
Support dygraph structuerd name ( #21930 )
...
* support dygraph structured name; test=develop
* add load static param unitest and fix save load; test=develop
* fix varBase import error; test=develop
* fix unitest error; test=develop
* add comment for parameter; test=develop
* fix uni test error; test=develop
* change parallel se-resnet; test=develop
* fix dygraph se resnext parallel test; test=develop
* remove useless code; test=develop
* remove useless code; test=develop
6 years ago
songyouwei
2a47cc5fc4
dygraph LayerList container ( #21734 )
...
* add dygraph LayerList
* add unittest
test=develop
* add newline
test=develop
* typo fix
test=develop
6 years ago
songyouwei
56414c7daf
move private weight fields to public ones ( #21982 )
...
* move private weight properties to public ones
test=develop
* revert changes to FC
test=develop
* fix unittest
test=develop
* fix unittest
test=develop
* fix coverage
test=develop
* fix merged dev
test=develop
* bug fix
test=develop
6 years ago
Zeng Jinle
86c40e207d
Expose fluid.dygraph.TracedLayer API ( #21518 )
...
* expost fluid.dygraph.TracedLayer apis, test=develop
* polish doc, test=develop
* follow comments, test=develop, test=document_fix
* follow comments, test=develop
* remove save_inference_model return value, test=develop
6 years ago
Leo Chen
33f1306753
update layers used in mnist dygraph model, test=develop ( #21947 )
...
* update layers used in mnist dygraph model, test=develop
* fix import issue, test=develop
* add dygraph utils, test=develop
* add unittest, test=develop
6 years ago
Leo Chen
ba51043f7e
remove parameter block in to_variable, test=develop ( #21933 )
6 years ago
zhongpu
dca075839b
remove params in Tracer object (in dygraph) ( #20815 )
...
* remove params in Tracer object, test=develop
* Repair failed optest, test=develop
* remove build_once & name_scope (Conv2D)
test=develop
* fix unittest
test=develop
* Conv2DTranspose
* Conv3D & Conv3DTranspose
test=develop
* Pool2D & BatchNorm
* Embedding
* LayerNorm
* GRUUnit & NCE
* PRelu
* BilinearTensorProduct
* GroupNorm & SpectralNorm
* TreeConv
test=develop
* fix LayerNorm in transformer unnittest
test=develop
* disable LayerNorm or BatchNorm in multicard
test=develop
* refine Layer.create_parameter api
test=develop
* refine LayerNorm, remove begin_norm_axis param, add normed shape check
test=develop
* LayerNorm bug fix
test=develop
* fix optest,test=develop
* fix optest, test=develop
* fix optest for pass parameter_list when constructing an Optimizer class instance, test=develop
* polish code for better code style, test=develop
* fix se_resnext optest, test=develop
* polish code for better code style, test=develop
Co-authored-by: songyouwei <youwei0314@gmail.com>
6 years ago
songyouwei
cff7a49856
Add ParameterList ( #21056 )
...
* add ParameterList container
* add unittest
test=develop
* fix container, rebase remove build_once
test=develop
* add parameters None check
test=develop
* update Sequential unittest
test=develop
* use Linear in Sequential sample code
test=develop
* fix Sequential arg type doc
test=develop
6 years ago
Leo Chen
310edc0d0c
Update layers used in ptb model to use auto-generated op functions in dygraph mode ( #21724 )
...
* update layers, test=develop
* fix input numpy, test=develop
* fix bugs, test=develop
* follow commments, test=develop
* update getitem, test=develop
6 years ago
songyouwei
63a5fb4cac
tmp fix depthwise_conv2d in dygraph ( #21840 )
...
test=develop
6 years ago
songyouwei
1395828408
Add dygraph Linear layer ( #21265 )
...
* add Linear layer
test=develop
* update unittest for coverage
test=develop
6 years ago
Zeng Jinle
04909137f5
fix lr assert, test=develop ( #21780 )
6 years ago
Leo Chen
c96f06f2f6
add unary operator __neg__, test=develop ( #21787 )
...
adds unary operator __neg__ for VarBase in dygraph mode, and for Variable in static graph mode.
6 years ago
Youwei Song
f6144d8463
remove build_once & name_scope ( #21131 )
...
* remove build_once & name_scope (Conv2D)
test=develop
* fix unittest
test=develop
* Conv2DTranspose
* Conv3D & Conv3DTranspose
test=develop
* Pool2D & BatchNorm
* Embedding
* LayerNorm
* GRUUnit & NCE
* PRelu
* BilinearTensorProduct
* GroupNorm & SpectralNorm
* TreeConv
test=develop
* fix LayerNorm in transformer unnittest
test=develop
* disable LayerNorm or BatchNorm in multicard
test=develop
* refine Layer.create_parameter api
test=develop
* refine LayerNorm, remove begin_norm_axis param, add normed shape check
test=develop
* LayerNorm bug fix
test=develop
6 years ago
Leo Chen
9c481e12ba
Patch math method for VarBase using auto-generated op functions ( #21656 )
...
* patch math method for varbase using auto-generated op functions, test=develop
* clean code that handles batch_size, test=develop
* follow comments, test=develop
* follow comments, test=develop
* code clean, test=develop
6 years ago
zhongpu
8777e8c1e9
fix Conv2DTranspose API, test=develop ( #21403 )
6 years ago
Leo Chen
4f81d1bd5f
Refine VarBase init function ( #21587 )
...
* refine init function, test=develop
* add tests, test=develop
* remove extern, which may cause symbol error in gcc-4.8, test=develop
6 years ago
hong
08483a6819
Add dygraph linear warm up decay ( #21186 )
...
* dygraph mode support linear lr warm up; test=develop
* add unitest for linear warmup; test=develop
* add input type check; test=develop
* fix type check assert error; test=develop
* change type error; test=develop
7 years ago
Leo Chen
cdd46d7e02
Split VarBase from Python Variable for Dygraph ( #21359 )
...
* test=develop, fix docker with paddle nccl problem
* don't expose numerous Tensor.set(), test=develop
* fix condition, test=develop
* fix float16 bug, test=develop
* feed should be Tensor or np.array, not Variable or number, test=develop
* use forcecast to copy numpy slice to new array, test=develop
* remove float16-uint16 hacking, test=develop
* add variable method to varbase and refactor to_variable to support return varbase
* support kwargs in varbase constructor
* add VarBase constructor to support default python args
* refine varbase initial method
* reset branch
* fix ut for change VarBase error info to PaddleEnforce
* cherry is parameter change before
* overload isinstance to replace too many change of is_variable
* rm useless files
* rm useless code merged by git
* test=develop, fix some ut failed error
* test=develop, fix test_graph_wrapper
* add some tests, test=develop
* refine __getitem__, test=develop
* add tests, test=develop
* fix err_msg, test=develop
7 years ago
Youwei Song
cdba41af4d
dygraph Embedding layer use lookuptable v2 ( #21209 )
...
* dygraph Embedding layer use lookuptable v2
test=develop
* fix test_nce
test=develop
7 years ago
Chen Weihang
664f958a02
Fix optimizer op infershape failed in dygraph multi-cards mode ( #21374 )
...
* add param & grad shape check for sgd op
* add _reshape_inplece interface for dygraph parallel
* refine unittest based paddle/models scripts, test=develop
* add unittest for parallel grad fuse, test=develop
7 years ago
Youwei Song
d5ff79e55e
Support numpy bridge (enabled by default in dygraph mode) ( #20983 )
...
* add numpy bridge
* fix template compile
* add unittest, add default
test=develop
* fix unittest
test=develop
* fix unittest
test=develop
* zero_copy=True for to_variable,
test=develop
* bug fix
test=develop
* disable deprecated NumPy API
test=develop
* use better design of NumpyAllocator
test=develop
* fix Py_None check
test=develop
* reset c++ tracer when jump out dygraph guard
test=develop
* refine PADDLE_ENFORCE_xx format
test=develop
* bug fix of tracer switch
test=develop
* update decref
test=develop
7 years ago
Zeng Jinle
67e88424e5
Polish jit trace codes ( #21218 )
...
* polish jit trace codes, test=develop
* polish codes again by removing var_id, test=develop
7 years ago
Zeng Jinle
0f30d3a213
fix dygraph trace bug, test=develop ( #21193 )
7 years ago
Zeng Jinle
5fdfbe3413
Add friendly dygraph trace API ( #21091 )
...
* friendly trace interface, test=develop
* refine TracedLayer, test=develop
* add some docs, test=develop
7 years ago
Wojciech Uss
226bc22a29
Remove fuse_with_relu argument from batch_norm constructor ( #21028 )
...
test=develop
7 years ago
Leo Chen
008ed65fd5
Add c++ global current tracer for dygraph ( #20882 )
...
* Add c++ global current tracer for dygraph, test=develop
* add tracer property in c++, test=develop
* support different place, test=develop
* add unittest for tracer, test=develop
7 years ago
Leo Chen
9974e40787
Update Tensor.set() to support float16 ( #19964 )
...
* don't expose numerous Tensor.set(), test=develop
* fix condition, test=develop
* fix float16 bug, test=develop
* feed should be Tensor or np.array, not Variable or number, test=develop
* use forcecast to copy numpy slice to new array, test=develop
* remove float16-uint16 hacking, test=develop
7 years ago
Youwei Song
2058bab1c0
Add Sequential api ( #20789 )
...
* add Sequential api
test=develop
* fix unittest
test=develop
* refine code sample
* test=develop
7 years ago
Zeng Jinle
378fc4fb1c
add some docs to jit.trace, test=develop ( #20811 )
7 years ago
Zeng Jinle
8ff6b289bd
[Dygraph to static graph]JIT/Trace ( #20775 )
...
* jit/trace 1st version, test=develop
* add more unittests, test=develop
7 years ago
Youwei Song
9a09ff14a5
fix en docs of Layer and guard ( #20512 )
...
* fix en docs of Layer and guard
test=document_fix, test=develop
* fix en docs of Layer and guard
test=document_fix, test=develop
* minor fix
test=document_fix, test=develop
* minor fix
test=document_fix, test=develop
* fix api.spec
test=document_fix, test=develop
* fix api.spec
test=document_fix, test=develop
* fix docs
test=document_fix, test=develop
* fix docs
test=document_fix, test=develop
* fix docs
test=document_fix, test=develop
* fix api.spec
test=document_fix, test=develop
* fix api.spec
test=document_fix, test=develop
* add forward doc
test=document_fix, test=develop
* add "s" for parameters
test=document_fix, test=develop
7 years ago
LielinJiang
faa8e30a14
Set batch norm and data norm argument 'do_model_average_for_mean_and_var' default as True ( #20421 )
...
* fix_norm_model_average_bug
* test=develop
* refine comment test=develop
* refine comment test=develop
7 years ago
zhongpu
0b321c8a2f
fix APIs, to_variable、NCE、PRelu、softmax、rankloss for dygraph, test=document_fix, test=develop ( #20142 )
7 years ago
zhongpu
52dcc1679d
fix Embedding API for dygraph ( #20358 )
...
* fix Embedding API for dygraph, test=develop, test=document_fix
* fix dtype, test=develop, test=document_fix
7 years ago
DuYao
76a5819728
update English document ( #20330 )
...
* update English document, test=document_fix
* update api.spec, test=document_fix
* update api.spec, test=document_fix
* update, test=document_fix
7 years ago
zhongpu
95e5768bd6
update conv, fc, pool op for dygraph, test=develop ( #20132 )
7 years ago
zhongpu
9ca417f1d0
fix APIs, update norm op, test=develop ( #20119 )
...
* update norm op, test=develop, test=document_fix
* fix norm api, test=develop, test=document_fix
7 years ago