以下两个命令不应该返回相同的结果吗?但在下面的案例中,我得到了不同的结果......我错过了什么?
A trick when you want to flatten a matrix X of shape (a,b,c,d) to a matrix X_flatten of shape (b ∗∗ c ∗∗ d, a) is to use:
X_flatten = X.reshape(X.shape[0], -1).T
train_set_x_flatten = train_set_x_orig.reshape(train_set_x_orig.shape[1]*train_set_x_orig.shape[2]*train_set_x_orig.shape[3],train_set_x_orig.shape[0] )
答案 0 :(得分:1)
这只是一个简单的问题。缺少括号
尝试一下:
<section id="sentence"></section>