Semiconductor optical amplifier (SOA) is widely used for power amplification in O-band, particularly for passive optical networks (PONs) which can greatly benefit its advantages of simple structure, low power consumption and integrability with photonics circuits. However, the annoying nonlinear pattern effect degrades system performance when the SOA is needed as a pre-amplifier in PONs. Conventional solutions for pattern effect mitigation are either based on optical filtering or gain clamping. They are not simple or sufficiently flexible for practical deployment. Neural network (NN) has been demonstrated for impairment compensation in optical communications thanks to its powerful nonlinear fitting ability. In this paper, for the first time, NN-based equalizer is proposed to mitigate the SOA pattern effect for 50G PON with intensity modulation and direct detection. The experimental results confirm that the NN-based equalizer can effectively mitigate the SOA nonlinear pattern effect and significantly improve the dynamic range of receiver, achieving 29-dB power budget with the FEC limit at 1e -2. Moreover, the well-trained NN model in the receiver side can be directly placed at the transmitter in the optical line terminal to pre-equalize the signal for transmission so as to simplify digital signal processing in the optical network unit.