Commit 2895d425 authored by Davis King's avatar Davis King

Fixed the new cache based epsilon feature so it actually prevents any calls to

the separation oracle once the cache based refinement starts.
parent ddc69808
......@@ -65,6 +65,7 @@ namespace dlib
}
void separation_oracle_cached (
const bool use_only_cache,
const bool skip_cache,
const scalar_type& saved_current_risk_gap,
const matrix_type& current_solution,
......@@ -102,8 +103,8 @@ namespace dlib
// a proxy for the true separation oracle. If the risk value has dropped
// by enough to get into the stopping condition then the best psi isn't
// good enough.
if (best_risk + saved_current_risk_gap > last_true_risk_computed &&
best_risk >= 0)
if ((best_risk + saved_current_risk_gap > last_true_risk_computed &&
best_risk >= 0) || use_only_cache)
{
out_psi = psi[best_idx];
lru_count[best_idx] = max_lru_count + 1;
......@@ -572,7 +573,8 @@ namespace dlib
feature_vector_type& psi
) const
{
cache[idx].separation_oracle_cached(skip_cache,
cache[idx].separation_oracle_cached(converged,
skip_cache,
saved_current_risk_gap,
current_solution,
loss,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment