A Dynamic Weighting Strategy to Mitigate Worker Node Failure in Distributed Deep Learning