modify weight file structure