Added debug_initialize_weight function.