REQUIRE_TRUE(shape::equalsSoft((INPUT_VARIABLE(i))->getShapeInfo(),(INPUT_VARIABLE(i+1))->getShapeInfo()),0,"STACK op: the shapes of all input arrays must be the same !");
REQUIRE_TRUE(dim<=input->rankOf(),0,"STACK op: the input dimension parameter must be <= rank of input arrays shapes (rank=%i), but got %i instead !",input->shapeOf(),dim);
REQUIRE_TRUE(dim<=inShapeInfo[0],0,"STACK op: the input dimension parameter must be <= rank of input arrays shapes (rank=%i), but got %i instead !",inShapeInfo[0],dim);