Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def inner(iteration, elapsed):
loss = calculate_loss(plays, model.item_factors, model.user_factors, 0)
print("model %s iteration %i loss %.5f" % (name, iteration, loss))
output[name].append(loss)
return inner
lambda _, X, Y: output['cg%i' % steps].append(calculate_loss(plays, X, Y,
0)),
iterations=25)
lambda _, X, Y: output['cholesky'].append(calculate_loss(plays, X, Y,
0)),
iterations=25)