This patch will add assertions for tensors rank in TransposeConv
visit func
Signed-off-by: shubham <shub98.gupta@samsung.com>
const ::internal::tflite::operand::Index hstride_index{node.param().hstride_index};
const ::internal::tflite::operand::Index vstride_index{node.param().vstride_index};
+ // Only 4D tensors are supported
+ assert(_ctx.at(ofm_index).shape().rank() == 4);
+ assert(_ctx.at(ofm_index).shape().rank() == _ctx.at(ifm_index).shape().rank());
+ assert(_ctx.at(ofm_index).shape().rank() == _ctx.at(ker_index).shape().rank());
+
const auto ofm_shape = _ctx.at(ofm_index).shape().asFeature();
const auto ifm_shape = _ctx.at(ifm_index).shape().asFeature();
const auto ker_shape = _ctx.at(ker_index).shape().asFeature();