if(input->rankOf()<=1){// when input is scalar or vector;
REQUIRE_TRUE(paddings->lengthOf()==2,0,"MIRROR_PAD OP: the length of paddings array must be equal 2, when input array is vector or scalar, bot but got %i instead !",paddings->rankOf());
REQUIRE_TRUE((paddings->e<Nd4jLong>(0)<=(input->lengthOf()-includeBorder))&&(paddings->e<Nd4jLong>(1)<=(input->lengthOf()-includeBorder)),0,"MIRROR_PAD OP: wrong content of paddings array, its elements must be no grater then length of input array (being vector or scalar) for symmetric mode (or length-1 for reflect mode) !");
}
else{
REQUIRE_TRUE(paddings->rankOf()==2,0,"MIRROR_PAD OP: the rank of paddings array must be equal 2, but got %i instead !",paddings->rankOf());
REQUIRE_TRUE(paddings->sizeAt(0)==input->rankOf(),0,"MIRROR_PAD OP: zero dimension of paddings array must be equal to input array rank, but got %i and %i correspondingly !",paddings->sizeAt(0),input->rankOf());
for(inti=0;i<input->rankOf();++i)
REQUIRE_TRUE((paddings->e<Nd4jLong>(i,0)<=(input->sizeAt(i)-includeBorder))&&(paddings->e<Nd4jLong>(i,1)<=(input->sizeAt(i)-includeBorder)),0,"MIRROR_PAD OP: wrong content of paddings array, its elements must be no grater then corresponding dimension of input array for symmetric mode (or dimension-1 for reflect mode) !");
REQUIRE_TRUE(paddings->lengthOf()==2,0,"MIRROR_PAD OP: the length of paddings array must be equal 2, when input array is vector or scalar, bot but got %i instead !",paddings->rankOf());
REQUIRE_TRUE((paddings->e<Nd4jLong>(0)<=(input->lengthOf()-includeBorder))&&(paddings->e<Nd4jLong>(1)<=(input->lengthOf()-includeBorder)),0,"MIRROR_PAD OP: wrong content of paddings array, its elements must be no grater then length of input array (being vector or scalar) for symmetric mode (or length-1 for reflect mode) !");
}
else{
REQUIRE_TRUE(paddings->rankOf()==2,0,"MIRROR_PAD OP: the rank of paddings array must be equal 2, but got %i instead !",paddings->rankOf());
REQUIRE_TRUE(paddings->sizeAt(0)==input->rankOf(),0,"MIRROR_PAD OP: zero dimension of paddings array must be equal to input array rank, but got %i and %i correspondingly !",paddings->sizeAt(0),input->rankOf());
for(inti=0;i<input->rankOf();++i)
REQUIRE_TRUE((paddings->e<Nd4jLong>(i,0)<=(input->sizeAt(i)-includeBorder))&&(paddings->e<Nd4jLong>(i,1)<=(input->sizeAt(i)-includeBorder)),0,"MIRROR_PAD OP: wrong content of paddings array, its elements must be no grater then corresponding dimension of input array for symmetric mode (or dimension-1 for reflect mode) !");