Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fix #17267, add expected and got datatype for concat error msgs #17271

Merged
merged 3 commits into from
Jan 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/operator/nn/concat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,15 @@ bool ConcatType(const nnvm::NodeAttrs& attrs,
int dtype = -1;

// checks uniformity of input
for (int i : *in_type) {
for (size_t i =0; i < in_type->size(); ++i) {
if (dtype == -1) {
dtype = i;
dtype = in_type->at(i);
} else {
CHECK(i == dtype ||
i == -1) <<
"Non-uniform data type in Concat";
CHECK(in_type->at(i) == dtype || in_type->at(i) == -1)
<< "Non-uniform data type in " << attrs.op->name
<< ", expected data type " << mxnet::op::type_string(dtype)
<< ", got data type " << mxnet::op::type_string(in_type->at(i))
<< " for input " << i;
}
}

Expand Down