Open sildeag opened 6 years ago
Input: X, Y = getfake(50, 2, 0.3)
X, Y = getfake(50, 2, 0.3)
tmp [[ 0.41137779 1.77428079]] <NDArray 1x2 @cpu(0)>
X[i,:] [ 0. 0.] <NDArray 2 @cpu(0)>
X <NDArray 50x2 @cpu(0)>
`Y [ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
Output: ValueError: operands could not be broadcast together with remapped shapes[original->remapped]: (1L, 2L) and requested shape (50L,)
ValueError: operands could not be broadcast together with remapped shapes[original->remapped]: (1L, 2L) and requested shape (50L,)
I think the tmp should be modified as tmp = nd.random_normal(shape=dimensions).
tmp
tmp = nd.random_normal(shape=dimensions)
Input:
X, Y = getfake(50, 2, 0.3)
tmp [[ 0.41137779 1.77428079]] <NDArray 1x2 @cpu(0)>
X[i,:] [ 0. 0.] <NDArray 2 @cpu(0)>
X <NDArray 50x2 @cpu(0)>
`Y [ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
Output:
ValueError: operands could not be broadcast together with remapped shapes[original->remapped]: (1L, 2L) and requested shape (50L,)