def evaluate_model_3D_unsup(list_minibatchs_vl, eval_fn):
"""Evalute the model over a set."""
error, output, code = None, None, None
for mn_vl in list_minibatchs_vl:
x = theano.shared(
mn_vl['x'], borrow=True).get_value(borrow=True)
[error_mn, output_mn, code_mn] = eval_fn(x)
if error is None:
error = error_mn
output = output_mn
code = code_mn
else:
error = np.vstack((error, error_mn))
output = np.vstack((output, output_mn))
code = np.vstack((code, code_mn))
return error, output, code
评论列表
文章目录