| 1671 | } |
| 1672 | |
| 1673 | void pooling::get_gradient( |
| 1674 | const tensor& gradient_input, |
| 1675 | const tensor& dest, |
| 1676 | const tensor& src, |
| 1677 | tensor& grad |
| 1678 | ) |
| 1679 | { |
| 1680 | DLIB_CASSERT(have_same_dimensions(gradient_input,dest)); |
| 1681 | DLIB_CASSERT(have_same_dimensions(src,grad)); |
| 1682 | |
| 1683 | const float alpha = 1; |
| 1684 | const float beta = 1; |
| 1685 | CHECK_CUDNN(cudnnPoolingBackward(context(), |
| 1686 | (const cudnnPoolingDescriptor_t)handle, |
| 1687 | &alpha, |
| 1688 | descriptor(dest), |
| 1689 | dest.device(), |
| 1690 | descriptor(gradient_input), |
| 1691 | gradient_input.device(), |
| 1692 | descriptor(src), |
| 1693 | src.device(), |
| 1694 | &beta, |
| 1695 | descriptor(grad), |
| 1696 | grad.device())); |
| 1697 | } |
| 1698 | |
| 1699 | // ------------------------------------------------------------------------------------ |
| 1700 |
nothing calls this directly
no test coverage detected