| 164 | |
| 165 | template <typename EXP> |
| 166 | void set_sample ( |
| 167 | unsigned long long idx, |
| 168 | const matrix_exp<EXP>& item |
| 169 | ) |
| 170 | { |
| 171 | DLIB_CASSERT(idx < (unsigned long long)num_samples()); |
| 172 | DLIB_CASSERT(item.size() == nr()*nc()*k()); |
| 173 | static_assert((is_same_type<float, typename EXP::type>::value == true), |
| 174 | "To assign a matrix to a tensor the matrix must contain float values"); |
| 175 | set_ptrm(host()+idx*item.size(), item.nr(), item.nc()) = item; |
| 176 | } |
| 177 | |
| 178 | |
| 179 | template <typename EXP> |
no test coverage detected