提交 fa33262d 编写于 作者: X xuwei06 提交者: Yu Yang

Check the input size for convolution.

Make sure the input size is correct.

Change-Id: I2559075e32a098c5ed51942ff8351d964a6d6c75
上级 b7157d44
......@@ -130,6 +130,12 @@ void ConvProjection::reshapeTensorDesc(int batchSize) {
void ConvProjection::reshape(int batchSize) {
size_t width = calOutputSize();
CHECK_EQ(width, out_->value->getWidth());
CHECK_EQ(channels_ * imageH_ * imageW_, in_->value->getWidth())
<< "Wrong input size for convolution"
<< " channels=" << channels_
<< " imageH=" << imageH_
<< " imageW=" << imageW_
<< " inputSize=" << in_->value->getWidth();
isSelectAlgo_ = (batchSize == batchNum_);
batchNum_ = batchSize;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册