This letter proposes a deep learning-based pilot assignment scheme (DL-PAS) for a massive multiple-input multiple-output (massive MIMO) system that utilizes a large number of antennas for multiple users. The proposed DL-PAS improves the performance in cellular networks with severe pilot contamination by learning the relationship between pilot assignment and the users' location pattern. In this letter, we design a novel supervised learning method, where input features and output labels are users' locations in all cells and pilot assignments, respectively. Specifically, pretrained optimal pilot assignments with given users' locations are provided through an exhaustive search method as the training data. Then, the proposed DL-PAS provides a near-optimal pilot assignment from the produced inferred function by analyzing the training data. We implement the proposed scheme using a commercial deep multilayer perceptron system. Simulation-based experiments show that the proposed scheme achieves almost 99.38% theoretical upper-bound performance with low complexity, requiring only 0.92-ms computational time.