         self.epsilon = epsilon
         self.runningMean = Parameter(Tensor(0))
         self.runningVariance = Parameter(Tensor(1))
-        self.mode = modeRef
+        self.learningPhaseIndicator = learningPhaseIndicator
     }
 }
 

    public func _vjpApplied(to input: Tensor<Scalar>) ->
        (Tensor<Scalar>, (Tensor<Scalar>) ->
            (Dropout<Scalar>.CotangentVector, Tensor<Scalar>)) {
        if mode.training {
            return Swift.valueWithPullback(at: self, input) {
                $0.applyTraining(to: $1)
            }
        } else {
            return Swift.valueWithPullback(at: self, input) {
                $0.applyInference(to: $1)
            }
        }

public extension Tensor where Scalar : BinaryFloatingPoint,
                       Scalar.RawSignificand : FixedWidthInteger {
    @differentiable(wrt: (self) where Scalar : Differentiable)
    func droppedOut(withProbability probability: Double) -> Tensor {
        let noise = Tensor(randomUniform: shape)
        let keepMask = noise .>= Scalar(probability)
        let keepProbability = Scalar(1.0 - probability)
        return self * Tensor(keepMask) / Tensor(keepProbability)
    }
}
