-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove not used params in GradientMachine::start #969
Remove not used params in GradientMachine::start #969
Conversation
赞! @reyoung |
@@ -212,11 +212,7 @@ class GradientMachine { | |||
* @note This function will only been implemented and used in a | |||
* multithreaded environment. | |||
*/ | |||
virtual void start(const TrainerConfig& config, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这两个参数之前有用过么
There was a problem hiding this comment.
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的参数就用不上了。
@@ -212,11 +212,7 @@ class GradientMachine { | |||
* @note This function will only been implemented and used in a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议解释一下start的作用
There was a problem hiding this comment.
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的时候会退出线程
* asymmetric_kernel * asymmetric_kernel
Remove all unused parameters in
GradientMachine::start
. Make this method easily exposed in SWIG.