How to use sd.nn.batchNorm(…) in Deeplearning4j?

 SDVariable mean = sd.var("mean", new XavierFanInInitScheme('c', NerUtil.MAX_SENTENCE_LENGTH * 6), NerUtil.MAX_SENTENCE_LENGTH * 6);
      SDVariable variance = sd.var("variance", new DistributionInitScheme('c', new UniformDistribution(0, 1)), NerUtil.MAX_SENTENCE_LENGTH * 6);
      SDVariable gamma = sd.var("gamma", new XavierFanInInitScheme('c', NerUtil.MAX_SENTENCE_LENGTH * 6), DataType.FLOAT, NerUtil.MAX_SENTENCE_LENGTH * 6);
      SDVariable beta = sd.var("beta", new XavierFanInInitScheme('c', NerUtil.MAX_SENTENCE_LENGTH * 6), DataType.FLOAT, NerUtil.MAX_SENTENCE_LENGTH * 6);

      SDVariable batchNorm1 = sd.nn.batchNorm("batchNorm1", bertOutput, mean, variance, gamma, beta, true, true, 1e-8, 2);
      SDVariable tanh1 = sd.nn.tanh("tanh1", batchNorm1);
      SDVariable mmul1 = sd.mmul("mmul1", tanh1, wOut);

mean, variance, gamma, beta should be variables or constants or others? just not know how to use this method.