Skip to content

Commit

Permalink
Rebase master
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen authored and piiswrong committed Dec 29, 2016
1 parent 346d6de commit d7a8a52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/ndarray/ndarray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ void CopyFromTo(const NDArray &from, NDArray *to, int priority) {
return;
}
CHECK(from.shape() == to->shape())
<< "operands shape mismatch";
<< "operands shape mismatch"
<< "from.shape = " << from.shape() << " to.shape=" << to->shape();
CHECK(from.shape().ndim() != 0)
<< "source operands have zero dimension shape";
// important: callback must always capture by value
Expand Down
4 changes: 2 additions & 2 deletions tests/python/unittest/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ def check_slice_channel(data_ndim, axis, num_outputs, squeeze_axis):
shape = np.random.randint(1, 5, data_ndim).tolist()
shape[axis] *= num_outputs
out_ele_shape = [ele for ele in shape]
out_ele_shape[axis] /= num_outputs
out_ele_shape[axis] //= num_outputs
data_npy = np.random.normal(size=shape)
out_grads_npy = [np.random.normal(size=out_ele_shape) for i in range(num_outputs)]
data = mx.sym.Variable('data')
sym = mx.sym.SliceChannel(data=data, num_outputs=num_outputs, axis=axis)
sym = mx.sym.SliceChannel(data=data, num_outputs=num_outputs, axis=axis, squeeze_axis=squeeze_axis)
exe = sym.simple_bind(ctx=default_context(), data=data_npy.shape)
assert len(exe.outputs) == num_outputs
outputs = exe.forward(is_train=True, data=data_npy)
Expand Down

0 comments on commit d7a8a52

Please sign in to comment.