In orthogonal frequency division multiplexing (OFDM) systems, channel estimation is by far the most important operation in the receiver to ensure the accurate detection and decoding. Over the years, pilot-aided channel estimation has been widely used for this purpose. In open-loop systems, since there is no feedback link between the transmitter and receiver, an approach based on the equi-spaced pilot assignment has been widely employed. In this paper, we propose a closed-loop non-uniform pilot allocation strategy based on deep neural network (DNN) technique. From the numerical evaluations, we show that the proposed autoencoder-based pilot allocation technique outperforms conventional approaches by a large margin, demonstrating its ability to learn the statistical characteristics of the wireless channel.