Changed average to output_weights