A revisit to MacKay algorithm and its application to deep network compression