diff --git a/dlib/dnn/tensor.h b/dlib/dnn/tensor.h index cc4f93d4e..b8804fcfe 100644 --- a/dlib/dnn/tensor.h +++ b/dlib/dnn/tensor.h @@ -168,7 +168,7 @@ namespace dlib const matrix_exp& item ) { - DLIB_CASSERT(idx < num_samples()); + DLIB_CASSERT(idx < (unsigned long)num_samples()); DLIB_CASSERT(item.size() == nr()*nc()*k()); static_assert((is_same_type::value == true), "To assign a matrix to a tensor the matrix must contain float values");