You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
For bugs or installation issues, please provide the following information.
The more information you provide, the more likely people will be able to help you.
inline NDArray Slice(index_t begin, index_t end) const {
NDArray ret = *this;
CHECK(!is_none()) << "NDArray is not initialized";
CHECK_GE(shape_[0], end) << "Slice end index out of range";
size_t length = shape_.ProdShape(1, shape_.ndim());
ret.offset_ += begin * length;
ret.shape_[0] = end - begin;
return ret;
}
For bugs or installation issues, please provide the following information.
The more information you provide, the more likely people will be able to help you.
Environment info
Operating System:
Ubuntu 16.04
Compiler:
gcc 5.2
Package used (Python/R/Scala/Julia):
cpp-package
MXNet version:
Or if installed from source:
MXNet commit hash (
git rev-parse HEAD
):5918bd1
If you are using python package, please provide
Python version and distribution:
If you are using R package, please provide
R
sessionInfo()
:Error Message:
Please paste the full error message, including stack trace.
Minimum reproducible example
if you are using your own code, please provide a short script that reproduces the error.
Steps to reproduce
or if you are running standard examples, please provide the commands you have run that lead to the error.
What have you tried to solve it?
Stack is:
args_map["data"] = data_array.Slice(0, batch_size).Copy(ctx_dev);
->
inline NDArray NDArray::Slice(mx_uint begin, mx_uint end) const { // begin: 0, end: 42
NDArrayHandle handle;
CHECK_EQ(MXNDArraySlice(GetHandle(), begin, end, &handle), 0);
->
int MXNDArraySlice(NDArrayHandle handle,
mx_uint slice_begin,
mx_uint slice_end,
NDArrayHandle *out) {
NDArray *ptr = new NDArray();
API_BEGIN();
ptr = static_cast<NDArray>(handle)->Slice(
slice_begin, slice_end);
->
inline NDArray Slice(index_t begin, index_t end) const {
NDArray ret = *this;
CHECK(!is_none()) << "NDArray is not initialized";
CHECK_GE(shape_[0], end) << "Slice end index out of range";
size_t length = shape_.ProdShape(1, shape_.ndim());
ret.offset_ += begin * length;
ret.shape_[0] = end - begin;
return ret;
}
The "CHECK_GE" assertion fires. slice = { 0, 1, 28, 28}
The text was updated successfully, but these errors were encountered: