REQUIRE_TRUE(reps_vector->lengthOf()==inRank,0,"TILE op: repeats vector length should be equal to input rank, but got %i and %i correspondingly !",reps_vector->lengthOf(),inRank);
reps=reps_vector->templateasVectorT<Nd4jLong>();
}
else{
REQUIRE_TRUE(false,0,"TILE op: this op requires repeats vector, either as IArgs or second array with length equal to rank of input array to be tiled !");
REQUIRE_TRUE(reps_vector->lengthOf()==inRank,0,"TILE op: repeats vector length should be equal to input rank, but got %i and %i correspondingly !",reps_vector->lengthOf(),inRank);
reps=reps_vector->templateasVectorT<Nd4jLong>();
}
else{
REQUIRE_TRUE(false,0,"TILE op: this op requires repeats vector, either as IArgs or second array with length equal to rank of input array to be tiled !");
REQUIRE_TRUE(reps_vector->lengthOf()==inRank,0,"TILE_BP op: repeats vector length should be equal to input rank, but got %i and %i correspondingly !",reps_vector->lengthOf(),inRank);
reps=reps_vector->templateasVectorT<Nd4jLong>();
gradO=INPUT_VARIABLE(2);
}
else{
REQUIRE_TRUE(false,0,"TILE_BP op: this op requires repeats vector, either as IArgs or second array with length equal to rank of input array to be tiled !");
}
REQUIRE_TRUE(inRank==gradO->rankOf(),0,"TILE_BP op: the ranks of input array and output's gradients array (next epsilon) must be equal, but got %i and %i correspondingly !",inRank,gradO->rankOf());
for(inti=0;i<inRank;++i)
REQUIRE_TRUE(gradO->sizeAt(i)==gradI->sizeAt(i)*reps[i],0,"TILE_BP op: shapes of input array and output's gradients array (next epsilon) are inconsistent !");
REQUIRE_TRUE(reps_vector->lengthOf()==inRank,0,"TILE_BP op: repeats vector length should be equal to input rank, but got %i and %i correspondingly !",reps_vector->lengthOf(),inRank);
reps=reps_vector->templateasVectorT<Nd4jLong>();
gradOShape=inputShape->at(2);
}
else{
REQUIRE_TRUE(false,0,"TILE_BP op: this op requires repeats vector, either as IArgs or second array with length equal to rank of input array to be tiled !");
}
REQUIRE_TRUE(inRank==gradOShape[0],0,"TILE_BP op: the ranks of input array and output's gradients array (next epsilon) must be equal, but got %i and %i correspondingly !",inRank,gradOShape[0]);
for(inti=0;i<inRank;++i)
REQUIRE_TRUE(shape::sizeAt(gradOShape,i)==shape::sizeAt(inShape,i)*reps[i],0,"TILE_BP op: shapes of input array and output's gradients array (next epsilon) are inconsistent !");