Update all models on each epoch

This commit is contained in:
Matthew Honnibal 2017-05-25 19:46:56 -05:00
parent faff1c23fb
commit dbf2a4cf57

View File

@ -223,8 +223,7 @@ class Language(object):
tokvecses, bp_tokvecses = tok2vec.model.begin_update(feats, drop=drop)
d_tokvecses = proc.update((docs, tokvecses), golds,
drop=drop, sgd=get_grads, losses=losses)
bp_tokvecses(d_tokvecses, sgd=get_grads)
break
bp_tokvecses(d_tokvecses, sgd=sgd)
for key, (W, dW) in grads.items():
sgd(W, dW, key=key)
# Clear the tensor variable, to free GPU memory.