Training with weights