Abstract Deep Network code