Don't conflate the [_Doppler effect_](https://en.m.wikipedia.org/wiki/Doppler_effect) with the [_Lorentz transformation_](https://en.m.wikipedia.org/wiki/Lorentz_transformation).

If the train is half-way past you at the moment when you measure, then the clock at the front will be receding from you, while the clock at the rear is approaching you. The _Doppler effect_ will cause your raw observation of the approaching clock's tick rate to be greater than your raw observation of the receding clock. But if you correct your observation to account for Doppler, then both tick rates should be the same, and _both_ will appear be slower than the tick rate of your own clock because of the Lorentz transformation.