def func_x(x): connection.forward_pass(theta, [x], out_buf) return sum_of_squares_error(out_buf, T)
def func_theta(th): connection.forward_pass(th, X_list, out_buf) return sum_of_squares_error(out_buf, T)