const Shape &inShape = _input.getShape();
uint32_t inRank = inShape.rank();
- assert(wShape.dim(wRank - 2) == inShape.dim(inRank - 1));
+ assert(inShape.dim(inRank - 1) == wShape.dim(wRank - 2));
const uint32_t len = wShape.dim(wRank - 2);
for (uint32_t i = 0u; i < len; ++i)
{
tIdx.at(wRank - 1) = i;
- const T& w = weights.at(tIdx);
+ const T& in = _input.at(tIdx);
tIdx.at(wRank - 1) = col;
tIdx.at(wRank - 2) = i;
- const T& in = _input.at(tIdx);
+ const T& w = weights.at(tIdx);
tIdx.at(wRank - 2) = row;
outputElement += w * in;
}
}
Shape outShape = wShape;
- outShape.dim(weightsRank - 1) = inShape.dim(weightsRank - 1);
- outShape.dim(weightsRank - 2) = wShape.dim(weightsRank - 2);
+ outShape.dim(weightsRank - 1) = wShape.dim(weightsRank - 1);
+ outShape.dim(weightsRank - 2) = inShape.dim(weightsRank - 2);
op.setOutputShape(0, outShape);
}