public function back(Deferred $prevGradient, Optimizer $optimizer) : Deferred
    {
        if (!$this->mask) {
            throw new RuntimeException('Must perform forward pass before'
                . ' backpropagating.');
        }

        $mask = $this->mask;

        unset($this->mask);

        return new Deferred(function () use ($prevGradient, $mask) {
            return $prevGradient->result()->multiply($mask);
        });
    }