Minor changes to avoid compiler warnings.

This commit is contained in:
Davis King 2017-11-25 08:07:36 -05:00
parent f3ecb81f5e
commit 0e7e433096
2 changed files with 14 additions and 10 deletions

View File

@ -705,7 +705,7 @@ namespace dlib
test_steps_without_progress = 0; test_steps_without_progress = 0;
// Empty out some of the previous loss values so that test_steps_without_progress // Empty out some of the previous loss values so that test_steps_without_progress
// will decrease below test_iter_without_progress_thresh. // will decrease below test_iter_without_progress_thresh.
for (int cnt = 0; cnt < test_previous_loss_values_dump_amount+test_iter_without_progress_thresh/10 && test_previous_loss_values.size() > 0; ++cnt) for (unsigned long cnt = 0; cnt < test_previous_loss_values_dump_amount+test_iter_without_progress_thresh/10 && test_previous_loss_values.size() > 0; ++cnt)
test_previous_loss_values.pop_front(); test_previous_loss_values.pop_front();
} }
} }
@ -825,7 +825,7 @@ namespace dlib
steps_without_progress = 0; steps_without_progress = 0;
// Empty out some of the previous loss values so that steps_without_progress // Empty out some of the previous loss values so that steps_without_progress
// will decrease below iter_without_progress_thresh. // will decrease below iter_without_progress_thresh.
for (int cnt = 0; cnt < previous_loss_values_dump_amount+iter_without_progress_thresh/10 && previous_loss_values.size() > 0; ++cnt) for (unsigned long cnt = 0; cnt < previous_loss_values_dump_amount+iter_without_progress_thresh/10 && previous_loss_values.size() > 0; ++cnt)
previous_loss_values.pop_front(); previous_loss_values.pop_front();
} }
} }
@ -1281,8 +1281,8 @@ namespace dlib
std::atomic<bool> updated_net_since_last_sync; std::atomic<bool> updated_net_since_last_sync;
bool sync_file_reloaded; bool sync_file_reloaded;
int previous_loss_values_dump_amount; unsigned long previous_loss_values_dump_amount;
int test_previous_loss_values_dump_amount; unsigned long test_previous_loss_values_dump_amount;
}; };
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------

View File

@ -27,12 +27,8 @@ namespace
dlib::rand rnd; dlib::rand rnd;
void matrix_test ( void matrix_test1 (
) )
/*!
ensures
- runs tests on the matrix stuff compliance with the specs
!*/
{ {
typedef memory_manager_stateless<char>::kernel_2_2a MM; typedef memory_manager_stateless<char>::kernel_2_2a MM;
print_spinner(); print_spinner();
@ -739,6 +735,13 @@ namespace
} }
}
void matrix_test2 (
)
{
typedef memory_manager_stateless<char>::kernel_2_2a MM;
{ {
srand(423452); srand(423452);
const long M = 10; const long M = 10;
@ -1145,7 +1148,8 @@ namespace
void perform_test ( void perform_test (
) )
{ {
matrix_test(); matrix_test1();
matrix_test2();
} }
} a; } a;