Skip to content

Conversation

reyoung
Copy link
Collaborator

@reyoung reyoung commented Dec 20, 2016

Remove all unused parameters in GradientMachine::start. Make this method easily exposed in SWIG.

@reyoung reyoung requested a review from hedaoyuan December 20, 2016 14:21
@wangkuiyi wangkuiyi self-assigned this Dec 20, 2016
@wangkuiyi
Copy link
Collaborator

赞! @reyoung

* @note This function will only been implemented and used in a
* multithreaded environment.
*/
virtual void start(const TrainerConfig& config,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这两个参数之前有用过么

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这两个参数之前有用过。在最开始Paddle支持很多GradientMachine,有一部分GradientMachine不会关注forward的时候的数据,而会在start的时候,直接获得DataProvider,进而获得数据。

目前大部分GradientMachine都已经统一成一个MultiGradientMachine了,并且数据的输入和输出也全在forward/backward进行了,这个start的参数就用不上了。

* @brief Used before formal training, start work-threads and set
* trainer Parameters;
*
* @note This function will only been implemented and used in a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议解释一下start的作用

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start之后,GradientMachine才可以做forward和backward。
对于某些GradientMachine来说,start过程会启动线程,而finish的时候会退出线程

@reyoung reyoung merged commit adc5839 into PaddlePaddle:develop Dec 21, 2016
@reyoung reyoung deleted the feature/clean_gradient_machine_start branch December 21, 2016 14:48
zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this pull request Sep 25, 2019
wangxicoding pushed a commit to wangxicoding/Paddle that referenced this pull request Dec 9, 2021
lizexu123 pushed a commit to lizexu123/Paddle that referenced this pull request Feb 23, 2024
* asymmetric_kernel

* asymmetric_kernel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants