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 observations to account for the Doppler effect, then you should conclude that both tick rates actually are the same, and both clocks will appear to tick more slowly than your own clock because of the Lorentz transformation.