| 654 | // ---------------------------------------------------------------------------------------- |
| 655 | |
| 656 | void compute_adam_update ( |
| 657 | size_t begin, |
| 658 | size_t end, |
| 659 | tensor& s, |
| 660 | tensor& m, |
| 661 | tensor& v, |
| 662 | const float t, |
| 663 | const float learning_rate, |
| 664 | const float weight_decay, |
| 665 | const float momentum1, |
| 666 | const float momentum2, |
| 667 | const tensor& params, |
| 668 | const tensor& params_grad |
| 669 | ) |
| 670 | { |
| 671 | IF_DLIB_USE_CUDA( |
| 672 | cuda::compute_adam_update(begin, end, s, m, v, t, learning_rate, weight_decay, momentum1, |
| 673 | momentum2, params, params_grad); |
| 674 | ) |
| 675 | |
| 676 | IF_DLIB_NOT_USE_CUDA( |
| 677 | cpu::compute_adam_update(begin, end, s, m, v, t, learning_rate, weight_decay, momentum1, |
| 678 | momentum2, params, params_grad); |
| 679 | ) |
| 680 | } |
| 681 | |
| 682 | // ---------------------------------------------------------------------------------------- |
| 683 |
nothing calls this directly
no outgoing calls
no test coverage detected