Skip to content

Instantly share code, notes, and snippets.

@funktor funktor/ Secret
Created Oct 14, 2018

What would you like to do?
def extract_age_range(test_pred_chunks):
outputs = []
for pred_chunks in test_pred_chunks:
if len(pred_chunks) > 0:
out = [get_min_max_age(' '.join(pred_chunk)) for pred_chunk in pred_chunks]
min_ages, max_ages = zip(*out)
min_age, max_age = max(min_ages), min(max_ages)
if max_age > min_age:
outputs.append((min_age, max_age))
outputs.append((-1.0, -1.0))
outputs.append((-1.0, -1.0))
return outputs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.