regularization is not correctly set in V2 API
Created by: lcy-seso
V2 API uses optimizer
to globally set the regularization. I use it as shown below to set the L2 regularization to 8e-4.
optimizer = paddle.optimizer.AdaDelta(
learning_rate=1e-1,
regularization=paddle.optimizer.L2Regularization(rate=8e-4),)
But when I print the topology parsing result, I find the regularization does not work at all. The result is as follows.
parameters {
name: "___lstmemory_3__.w0"
size: 1048576
initial_mean: 0.0
initial_std: 0.0005
dims: 512
dims: 512
dims: 4
initial_strategy: 0
initial_smart: false
}
But the correct result should be like this:
parameters {
name: "___lstmemory_3__.w0"
size: 1048576
initial_mean: 0.0
initial_std: 0.0005
decay_rate: 0.0008
dims: 512
dims: 512
dims: 4
initial_strategy: 0
initial_smart: false
}