We propose a gray coding method for deep neural network (DNN) based decoder. With multiple resources considered together, DNN can be used to decode corrupted signals. In deep learning training, stochastic gradient descent (SGD) algorithm is used, which means that the cost function must be differentiable. Then, allocating the discrete bits for each symbol is difficult. To solve this problem, the basic gray coding for 4-quadrature amplitude modulation (QAM) is investigated for deep learning training. The performance of the proposed scheme is evaluated by simulation result compared with non-gray coding scheme. The symbol error rate (SER) performance is shown to be equivalent, but the bit error rate (BER) performance of the proposed scheme is shown to be better, which implies the gray coding is successfully done.