diff --git a/dlib/dnn/input.h b/dlib/dnn/input.h index 1fb6bd494..6cf8b0467 100644 --- a/dlib/dnn/input.h +++ b/dlib/dnn/input.h @@ -208,9 +208,9 @@ namespace dlib auto ptr = data.host(); for (auto i = ibegin; i != iend; ++i) { - for (long r = 0; r < NR; ++r) + for (size_t r = 0; r < NR; ++r) { - for (long c = 0; c < NC; ++c) + for (size_t c = 0; c < NC; ++c) { rgb_pixel temp = (*i)(r,c); auto p = ptr++; diff --git a/examples/dnn_imagenet_train_ex.cpp b/examples/dnn_imagenet_train_ex.cpp index 9fdddf672..4428f3b2c 100644 --- a/examples/dnn_imagenet_train_ex.cpp +++ b/examples/dnn_imagenet_train_ex.cpp @@ -132,7 +132,7 @@ struct image_info { string filename; string label; - unsigned long numeric_label; + long numeric_label; }; std::vector get_imagenet_train_listing(