outer_prod paper code