Skip to content

Instantly share code, notes, and snippets.

@brinkar
Last active February 6, 2017 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brinkar/28436af3f685f710a4d2bd58018267d0 to your computer and use it in GitHub Desktop.
Save brinkar/28436af3f685f710a4d2bd58018267d0 to your computer and use it in GitHub Desktop.
def MAML(**params):
while True:
score, within_constraints = define_problem(**params)
data = collect_data() # TODO: Split in train/test?
model = simple_model(data)
assert within_constraints(model)
model_score = score(model, data)
while True:
data = more_and_or_better_data_if_available()
model = improve_model(data)
if within_constraints(model) and score(model, data) > model_score:
model_score = score(model, data)
else:
params, params_updated = update_params()
if not params_updated:
break
return model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment