Skip to content

Commit

Permalink
update code and README
Browse files Browse the repository at this point in the history
  • Loading branch information
An Wangpeng committed Jun 3, 2018
1 parent 633d729 commit 96c2a75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@ This is the code associated with A PID Controller Approach for Stochastic Optimi
## Citation:
If PIDOptimizer is used in your paper/experiments, please cite the following papers.
```
@inproceedings{pid2018,
title={A PID Controller Approach for Stochastic Optimization of Deep Networks},
author={Wangpeng An and Haoqian Wang and Qingyun and Jun Xu and Qionghai Dai and Lei Zhang},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
year={2018}
}
```
2 changes: 1 addition & 1 deletion pid.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def step(self, closure=None):
D_buf = param_state['D_buffer']
g_buf = param_state['grad_buffer']

D_buf.mul_(momentum).add_(group['lr'], d_p-g_buf)
D_buf.mul_(momentum).add_(1-momentum, d_p-g_buf)
g_buf = d_p.clone()

d_p = d_p.add_(I, I_buf).add_(D, D_buf)
Expand Down

0 comments on commit 96c2a75

Please sign in to comment.