[Relay] Fix BatchMatMulRel typerelation (#3032)

return false mean retry in the future, and in the case of error, it should be report ASAP, not retry.
This commit is contained in:
雾雨魔理沙 2019-04-16 12:37:49 -07:00 коммит произвёл Tianqi Chen
Родитель 4b487c0d09
Коммит 7ee5cbac6d
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -658,7 +658,7 @@ bool BatchMatmulRel(const Array<Type>& types,
const auto* x = types[0].as<TensorTypeNode>(); const auto* x = types[0].as<TensorTypeNode>();
const auto* y = types[1].as<TensorTypeNode>(); const auto* y = types[1].as<TensorTypeNode>();
if (x == nullptr || y == nullptr) return false; if (x == nullptr || y == nullptr) return false;
if (x->shape.size() != 3 || y->shape.size() != 3) return false; CHECK(x->shape.size() == 3 && y->shape.size() == 3);
CHECK(reporter->AssertEQ(x->shape[0], y->shape[0])) CHECK(reporter->AssertEQ(x->shape[0], y->shape[0]))
<< "BatchDot: batch dimension doesn't match, " << "BatchDot: batch dimension doesn't match, "
<< " x shape=" << x->shape << " x shape=" << x->shape