| 79 | } |
| 80 | |
| 81 | void dot_prods ( |
| 82 | resizable_tensor& out, |
| 83 | const tensor& lhs, |
| 84 | const tensor& rhs |
| 85 | ) |
| 86 | { |
| 87 | IF_DLIB_USE_CUDA( |
| 88 | cuda::dot_prods(out, lhs, rhs); |
| 89 | ) |
| 90 | |
| 91 | IF_DLIB_NOT_USE_CUDA( |
| 92 | out = sum_cols(pointwise_multiply(mat(lhs), mat(rhs))); |
| 93 | ) |
| 94 | } |
| 95 | |
| 96 | void dot_prods ( |
| 97 | bool add_to, |