Training on multiple devices