# Error: (-215:Assertion failed) !dsize.empty() in function 'resize'

**URL:** <https://forum.opencv.org/t/error-215-assertion-failed-dsize-empty-in-function-resize/8894>\
**Category:** Uncategorized\
**Created:** [May 24, 2022, 12:26pm UTC](https://forum.opencv.org/t/error-215-assertion-failed-dsize-empty-in-function-resize/8894 "2022-05-24T12:26:34Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [May 24, 2022, 3:11pm UTC](https://forum.opencv.org/t/error-215-assertion-failed-dsize-empty-in-function-resize/8894/9 "2022-05-24T15:11:07Z")

</div>

yea, i remember, we had ALL OF THIS before…

> [@Error: Number of input channels should be multiple of 3 but got 1 in function 'cv::dnn::ConvolutionLayerImpl::getMemoryShapes'](https://forum.opencv.org/t/error-number-of-input-channels-should-be-multiple-of-3-but-got-1-in-function-cv-getmemoryshapes/8802):
>
> Hi! I recently trained a model on Keras and wanted to run it on OpenCV, so I used the ReadNetFromTensorflow function. I made model predictions using the blobFromImage() and .forward() methods. Yet I keep getting this error: `error: OpenCV(4.5.3) Error: Number of input channels should be multiple of 3 but got 1 in function ‘cv::dnn::ConvolutionLayerImpl::getMemoryShapes’ Here is the code used to train the model: import tensorflow as tf from tensorflow.keras.preprocessing.image import ImageDat…

---

_[View the full topic](https://forum.opencv.org/t/error-215-assertion-failed-dsize-empty-in-function-resize/8894)._
