Network compression via network memory: fundamental performance limits