save weights state and restore