graph updated for every epoch