def destructure_x(x, return_t=False): X_, t = x[:-y.size].reshape(X.shape), x[-y.size:] y_ = sigmoid(t) return (X_, y_, t) if return_t else (X_, y_)
def destructure_x(x, return_ts=False): Xs = list(x[:N * X_size].reshape((N,) + X_shape)) ts = x[N* X_size:].reshape(N, y_size) ys = list(sigmoid(ts)) return (Xs, ys, ts) if return_ts else (Xs, ys)