Fix PU 2D weight generation script