save/restore shared weights unit test