Physical-layer network coding (PNC) is an effective technique for enhancing wireless network throughput. Recently, it has been demonstrated that convolutional autoencoders effectively works in point-to-point communication systems, but their application to wireless relay networks is scarcely explored. In this letter, we propose a convolutional autoencoder for PNC in a two-way relay channel. The constellation mapping and demapping of symbols at each node are determined adaptively through a deep learning technique, such that the bit error rate performance is improved for high-order modulation. Simulation results verify the advantages of the proposed scheme over the conventional PNC scheme for various modulation types. IEEE