reduce memory usage and put all weight = 1.0