- 19 2月, 2021 1 次提交
-
-
由 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
-
- 20 1月, 2021 1 次提交
-
-
由 Aurelius84 提交于
[Dy2static]Fix paddle prefix in is_paddle_api (#30569) cherry-pick #30569
-
- 14 1月, 2021 1 次提交
-
-
由 Chen Weihang 提交于
[Cherry-pick] Fix prune input bug of jit.save cheryy-pick of #30384
-
- 11 1月, 2021 3 次提交
-
-
由 Huihuang Zheng 提交于
Cherry-pick of PR #30208 , this PR added clone method for static Variable so that this interface will be same as dygraph. It fixed some bugs in dy2stat where users called clone of dygraph Tensor.
-
由 Aurelius84 提交于
* fix tensor shape bug * fix op_num * clean code
-
由 XiaoguangHu 提交于
* fix dynamic to static error * delete paddle.nn.functional.assign
-
- 08 1月, 2021 1 次提交
-
-
由 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)
-
- 05 1月, 2021 1 次提交
-
-
由 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)
-
- 28 12月, 2020 2 次提交
-
-
由 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
-
由 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.
-
- 04 12月, 2020 3 次提交
-
-
由 Huihuang Zheng 提交于
Reduce exception type so that if covert_to_static failed, it reports right error message.
-
由 liym27 提交于
[cherry-pick 2.0rc1][Dy2Stat] Fix bug: Do not use gast.Subscript to replace gast.Name in when transforming for_enumerate_loop (#29310) (#29361)
-
由 liym27 提交于
[Cheery-Pick 2.0.0-rc1][Dy2stat] Add a decorator paddle.jit.not_to_static to support that not to convert a function in Dynamic-to-Static. (#29253) (#29340) Usage scenarios:A function could have run successfully in static mode, you can use it to decorate a function in the following cases: 1. An unknown error occurs in the dynamic-to-static conversion process of the function; 2. In the internal implementation of the function, it has two branches: dynamic branch and static branch; 3. Users don't want to convert the function in the process of dynamic to static.
-
- 03 12月, 2020 1 次提交
-
-
由 Huihuang Zheng 提交于
Cherry-pick of PR #29226
-
- 30 11月, 2020 1 次提交
-
-
由 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'
-
- 28 11月, 2020 2 次提交
- 27 11月, 2020 1 次提交
-
-
由 liym27 提交于
[Dynamic-to-Static] Support **kwargs as input of the function which is decorated by `jit.save.to_static` (#29098)
-
- 25 11月, 2020 1 次提交
-
-
由 liym27 提交于
* Support pop for dict in dy2stat * Move convert_pop to convert_operators.py and polish convert_pop
-
- 24 11月, 2020 3 次提交
-
-
由 Huihuang Zheng 提交于
Add support for using tuple as tensor.shape (For example: a, b, c, d = x.shape)
-
由 liym27 提交于
[Dynamic-to-Static] Fix bug of convert_logical_and/convert_logical_or: the operands are executed sequentially(#28993) 1) The operands are executed sequentially according to the running logic of Python. 2) If the left hand operand is True(for convert_logical_or)/False(for convert_logical_and), the right hand operand should be executed.
-
由 Huihuang Zheng 提交于
The PR description is long. See details in the PR link.
-
- 19 11月, 2020 4 次提交
-
-
由 liym27 提交于
-
由 liym27 提交于
[Dynamic-to-Static] Fix bug in loop_transformer: loop vars should contain the var from ancestor-for-node (#28735)
-
由 liym27 提交于
[Dynamic-to-Static ErrorMessage] Support dy2stat error message when call jit.save and polish error message (#28713) * Support dy2stat error message when call jit.save; * Polish dy2stat error message: (1) the original dygraph code is marked with (* user code *) ; (2) "In user code:" -> "In transformed code:"
-
由 Huihuang Zheng 提交于
Fix convert_callmMay be called multiple times in Dy2stat. Also strip some strings to make sure no influence from blank spaces.
-
- 17 11月, 2020 1 次提交
-
-
由 Huihuang Zheng 提交于
Fix a bug that used in PaddleGAN model which used `isinstance` in a for loop
-
- 11 11月, 2020 2 次提交
-
-
由 liym27 提交于
1. Remove 'fluid'; 2. Variable -> Tensor APIs: sum, convert_call, convert_ifelse, convert_logical_and, convert_logical_or, convert_logical_not
-
由 Huihuang Zheng 提交于
Modify ProgramTranslator and TracedLayer Doc for API 2.0
-
- 10 11月, 2020 1 次提交
-
-
由 Huihuang Zheng 提交于
Remove "fluid", "variable" in 2.0 API doc
-
- 05 11月, 2020 1 次提交
-
-
由 Aurelius84 提交于
* Fix bug in convert_call * refine unittest * refine code * refine code * fix unittest failed * add assert
-
- 27 10月, 2020 1 次提交
-
-
由 liym27 提交于
[Dy2Stat-log] Call warnings.warn() to display the warning-message only once when calling StaticFunc.__call__ or ProgramTranslator().get_output (#28260)
-
- 26 10月, 2020 1 次提交
-
-
由 Aurelius84 提交于
* Join break cond with while cond * remove usless code * refine the if code * Split into BreakTransfromOptimizer * add BreakTransformOptimizer in ast_transformer * add more comment
-
- 22 10月, 2020 1 次提交
-
-
由 Aurelius84 提交于
* remove some judgement * fix len(outputs) == 1
-
- 20 10月, 2020 1 次提交
-
-
由 Aurelius84 提交于
* refine code of DygraphToStaticAst * add __init__ function
-
- 17 10月, 2020 1 次提交
-
-
由 Aurelius84 提交于
* fix test_lstm unittest failed * add more unittest * modify cmakelist * fix judgement
-
- 16 10月, 2020 2 次提交
-
-
由 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
-
由 Aurelius84 提交于
* Fix save in eval mode * remove assert statement * fix test_partial_program failed * add more test * modify back into _train_program
-
- 14 10月, 2020 1 次提交
-
-
由 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
-
- 13 10月, 2020 1 次提交
-
-
由 Huihuang Zheng 提交于
As the title
-