code: func (co *Context) BatchNormalizationForwardTraining(mode BatchNormMode, alpha float64, beta float64, xDesc *TensorDescriptor, x Memory, yDesc *TensorDescriptor, y Memory, bnScaleBiasMeanVarDesc *TensorDescriptor, bnScale Memory, bnBias Memory, exponentialAverageFactor float64, resultRunningMean Memory, resultRunningVariance Memory, epsilon float64, resultSaveMean Memory, resultSaveInvVariance Memory) error {
  	// DOUBLECHECK: "cudnnBatchNormalizationForwardTraining" returns Memory type in Parameter 16
  	var alphaC, betaC unsafe.Pointer
  	switch xDesc.dataType {
  	case Float, Half:
  		var alphaF, betaF C.float
  		alphaF = C.float(float32(alpha))
  		betaF = C.float(float32(beta))
  		alphaC = unsafe.Pointer(&alphaF)
  		betaC = unsafe.Pointer(&betaF)
  	case Double:
  		var alphaF, betaF C.double
  		alphaF = C.double(alpha)
  		betaF = C.double(beta)
  		alphaC = unsafe.Pointer(&alphaF)
  		betaC = unsafe.Pointer(&betaF)
  	default:
  		return errors.Errorf("Unsupported data type: %v", xDesc.dataType)
  	}
  	// call cudnnBatchNormalizationForwardTraining
  	return result(C.cudnnBatchNormalizationForwardTraining(co.internal, mode.C(), alphaC, betaC, xDesc.internal, x.Pointer(), yDesc.internal, y.Pointer(), bnScaleBiasMeanVarDesc.internal, bnScale.Pointer(), bnBias.Pointer(), C.double(exponentialAverageFactor), resultRunningMean.Pointer(), resultRunningVariance.Pointer(), C.double(epsilon), resultSaveMean.Pointer(), resultSaveInvVariance.Pointer()))
  }
docs: // BatchNormalizationForwardTraining performs the forward BatchNormalization layer computation for training phase.