| 1576 | } |
| 1577 | |
| 1578 | void embeddings_gradient( |
| 1579 | const tensor& prev, |
| 1580 | const tensor& gradient_input, |
| 1581 | tensor& grads, |
| 1582 | const tensor& freqs, |
| 1583 | float learning_rate, |
| 1584 | bool scale |
| 1585 | ) |
| 1586 | { |
| 1587 | IF_DLIB_USE_CUDA( |
| 1588 | cuda::embeddings_gradient(prev, gradient_input, grads, freqs, learning_rate, scale); |
| 1589 | ) |
| 1590 | |
| 1591 | IF_DLIB_NOT_USE_CUDA( |
| 1592 | cpu::embeddings_gradient(prev, gradient_input, grads, freqs, learning_rate, scale); |
| 1593 | ) |
| 1594 | } |
| 1595 | |
| 1596 | // ---------------------------------------------------------------------------------------- |
| 1597 |
nothing calls this directly
no outgoing calls
no test coverage detected