Understanding Self-supervised Learning with Dual Deep Networks