Transforms { public static INDArray pow(INDArray ndArray,Number power) { return pow(ndArray,power,true); }  static INDArray maxPool(INDArray input,int[] ds,boolean ignoreBorder); static INDArray downSample(INDArray d1,int[] stride); static INDArray pool(INDArray toPool,int[] stride); static INDArray upSample(INDArray d, INDArray scale); static double cosineSim(INDArray d1, INDArray d2); static INDArray normalizeZeroMeanAndUnitVariance(INDArray toNormalize); static INDArray unitVec(INDArray toScale); static INDArray neg(INDArray ndArray); static IComplexNDArray neg(IComplexNDArray ndArray); static INDArray eq(INDArray ndArray); static IComplexNDArray eq(IComplexNDArray ndArray); static INDArray neq(INDArray ndArray); static IComplexNDArray neq(IComplexNDArray ndArray); static INDArray floor(INDArray ndArray); static INDArray sign(IComplexNDArray toSign); static INDArray sign(INDArray toSign); static IComplexNDArray floor(IComplexNDArray ndArray); static INDArray gt(INDArray ndArray); static IComplexNDArray gt(IComplexNDArray ndArray); static INDArray lt(INDArray ndArray); static IComplexNDArray lt(IComplexNDArray ndArray); static INDArray stabilize(INDArray ndArray,double k); static IComplexNDArray stabilize(IComplexNDArray ndArray,double k); static INDArray abs(INDArray ndArray); static IComplexNDArray abs(IComplexNDArray ndArray); static INDArray exp(INDArray ndArray); static IComplexNDArray exp(IComplexNDArray ndArray); static INDArray hardTanh(INDArray ndArray); static IComplexNDArray hardTanh(IComplexNDArray ndArray); static INDArray identity(INDArray ndArray); static IComplexNDArray identity(IComplexNDArray ndArray); static INDArray max(INDArray ndArray); static INDArray max(INDArray ndArray,double max); static IComplexNDArray max(IComplexNDArray ndArray,double max); static IComplexNDArray max(IComplexNDArray ndArray); static INDArray pow(INDArray ndArray,Number power); static IComplexNDArray pow(IComplexNDArray ndArray,IComplexNumber power); static INDArray round(INDArray ndArray); static IComplexNDArray round(IComplexNDArray ndArray); static INDArray sigmoid(INDArray ndArray); static IComplexNDArray sigmoid(IComplexNDArray ndArray); static INDArray sqrt(INDArray ndArray); static IComplexNDArray sqrt(IComplexNDArray ndArray); static INDArray tanh(INDArray ndArray); static IComplexNDArray tanh(IComplexNDArray ndArray); static INDArray log(INDArray ndArray); static IComplexNDArray log(IComplexNDArray ndArray); static INDArray eq(INDArray ndArray,boolean dup); static IComplexNDArray eq(IComplexNDArray ndArray,boolean dup); static INDArray neq(INDArray ndArray,boolean dup); static IComplexNDArray neq(IComplexNDArray ndArray,boolean dup); static INDArray floor(INDArray ndArray,boolean dup); static INDArray sign(IComplexNDArray toSign,boolean dup); static INDArray sign(INDArray toSign,boolean dup); static IComplexNDArray floor(IComplexNDArray ndArray,boolean dup); static INDArray gt(INDArray ndArray,boolean dup); static IComplexNDArray gt(IComplexNDArray ndArray,boolean dup); static INDArray lt(INDArray ndArray,boolean dup); static IComplexNDArray lt(IComplexNDArray ndArray,boolean dup); static INDArray stabilize(INDArray ndArray,double k,boolean dup); static IComplexNDArray stabilize(IComplexNDArray ndArray,double k,boolean dup); static INDArray abs(INDArray ndArray,boolean dup); static IComplexNDArray abs(IComplexNDArray ndArray,boolean dup); static INDArray exp(INDArray ndArray,boolean dup); static IComplexNDArray exp(IComplexNDArray ndArray,boolean dup); static INDArray hardTanh(INDArray ndArray,boolean dup); static IComplexNDArray hardTanh(IComplexNDArray ndArray,boolean dup); static INDArray identity(INDArray ndArray,boolean dup); static IComplexNDArray identity(IComplexNDArray ndArray,boolean dup); static INDArray max(INDArray ndArray,boolean dup); static INDArray max(INDArray ndArray,double max,boolean dup); static IComplexNDArray max(IComplexNDArray ndArray,double max,boolean dup); static IComplexNDArray max(IComplexNDArray ndArray,boolean dup); static INDArray pow(INDArray ndArray,Number power,boolean dup); static IComplexNDArray pow(IComplexNDArray ndArray,IComplexNumber power,boolean dup); static INDArray round(INDArray ndArray,boolean dup); static IComplexNDArray round(IComplexNDArray ndArray,boolean dup); static INDArray sigmoid(INDArray ndArray,boolean dup); static IComplexNDArray sigmoid(IComplexNDArray ndArray,boolean dup); static INDArray sqrt(INDArray ndArray,boolean dup); static IComplexNDArray sqrt(IComplexNDArray ndArray,boolean dup); static INDArray tanh(INDArray ndArray,boolean dup); static IComplexNDArray tanh(IComplexNDArray ndArray,boolean dup); static INDArray log(INDArray ndArray,boolean dup); static IComplexNDArray log(IComplexNDArray ndArray,boolean dup); static INDArray neg(INDArray ndArray,boolean dup); static IComplexNDArray neg(IComplexNDArray ndArray,boolean dup);  }
@Test public void testPow() { INDArray twos = Nd4j.valueArrayOf(2,2); INDArray pow = Transforms.pow(twos,2); assertEquals(Nd4j.valueArrayOf(2,4),pow); }