Training DNN in Heterogeneous environment