mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Fix running gradient crashing sometimes (#2401)
This commit is contained in:
parent
16500906b0
commit
bec25d8247
@ -1121,7 +1121,7 @@ namespace dlib
|
||||
}
|
||||
|
||||
// if we haven't seen much data yet then just say false.
|
||||
if (gradient_updates_since_last_sync < 30)
|
||||
if (previous_loss_values_to_keep_until_disk_sync.size() < 30)
|
||||
return false;
|
||||
|
||||
// if the loss is very likely to be increasing then return true
|
||||
|
Loading…
Reference in New Issue
Block a user