Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

paddle的sparse update原理

Open cszhou opened this issue 9 years ago • 4 comments

Hi, 在使用paddle v1和v2的过程中,在sparse update上遇到一些坑。 (1) 使用v2的时候,遇到开启sparse update但是训练效率并没有提升的问题。 (2) 现在用v1的时候, 开启sparse update的时候,trainner count不能为8,只能为1,否则出现一个现象:第一个batch的loss就为0,此后一直不变。见 #5670 不开启sparse update的时候,trainer count为1的时候,报错,request.ParseFromString(str)

在使用过程中,并不明白sparse update的工作机制,请教下,是否有文档查看开启sparse 后参数更新的工作原理?

cszhou avatar Nov 30 '17 03:11 cszhou

1、https://github.com/PaddlePaddle/Paddle/issues/5737 2、http://staging.paddlepaddle.org/docs/develop/documentation/en/design/cluster_train/pserver_client.html?#sparse-parameter 您先参考参考

sweetsky0901 avatar Nov 30 '17 06:11 sweetsky0901

request.ParseFromString 是deserialize protobuf message的代码。这应该是一个bug,trainer_count>1时的sparse的情况,需要排查一下。

typhoonzero avatar Dec 01 '17 05:12 typhoonzero

由于长时间没有更新的信息,先关闭这个issue了,如有进一步反馈请随时重新打开。

Yancey0623 avatar May 09 '18 11:05 Yancey0623

可以使用Fluid API,sparse update原理可以参考:https://github.com/PaddlePaddle/Paddle/blob/develop/doc/fluid/design/dist_train/parameter_server.md#sparse-update

Yancey0623 avatar May 09 '18 11:05 Yancey0623