CV_Assert(starts.size() == ends.size());
if (axis > 0) {
+ CV_CheckLE(axis, 1024, "Slice layer can't have more than 1024 axes"); // arbitrary limit
begin.resize(axis, 0);
end.resize(axis, -1);
}
const int numDirs = Wx.size[0]; // Is 1 for forward only and 2 for bidirectional LSTM.
const int numFeatures = Wx.size[2];
+ // Following checks are deduced from the IFGO->IGFO loop below
+ // Wx is numDirs X numHidden*3 X numFeatures
+ // Wh is numDirs X numHidden*3 X numHidden
+ CV_CheckLE(numHidden * 3, Wx.size[1], "Wx should have beat least 3x hidden_size in dimension 1");
+ CV_CheckLE(numHidden * 3, Wh.size[1], "Wh should have be at least 3x hidden_size in dimension 1");
+ CV_CheckLE(numHidden, Wh.size[2], "Wh should have be at least hidden_size in dimension 2");
+
Mat h0, c0;
if (!node_proto.input(5).empty()) {
h0 = getBlob(node_proto, 5);
Mat bh = b.colRange(b.cols / 2, b.cols);
b = bx + bh;
+ // b is numDirs X numHidden*3
+ CV_CheckLE(numHidden * 3, b.cols, "Bias data should have at least 3x hidden_size columns");
+
// IFGO->IGFO
for (int k = 0; k < numDirs; ++k)
{
}
void cv::MediaFrame::serialize(cv::gapi::s11n::IOStream& os) const {
- return m->adapter->serialize(os);
+ m->adapter->serialize(os);
}
cv::MediaFrame::View::View(Ptrs&& ptrs, Strides&& strs, Callback &&cb)