We propose an end-to-end learning-based approximate method for subgraph matching task, called subgraph matching network (Sub-GMN). First, Sub-GMN uses graph representation learning to map nodes to node-level embedding, and then combines metric learning and attention mechanisms to model the relationship between matched nodes in the data graph and query graph. Compared with the previous GNNs-based method for subgraph matching task, Sub-GMN can obtain the node-to-node matching relationships and allow varying the input composed of query graph and data graph in the test phase, while previous GNNs-based methods for subgraph matching task can only match a fixed and unchanged subgraph and cannot output the node-to-node matching relationships. In this paper, there are two contribution. The first contribution is that Sub-GMN is the first learning based methods for subgraph matching task and can output node-to-node matching relationships. To our best knowledge, no learning based methods have been proposed in formal journals that match subgraphs, and output node-to-node matching relationships, while allow varying query and data graphes for subgraph matching task. The second contribution is that Sub-GMN has achieved better experimental results than previous GNNs-based method for subgraph matching task from the perspective of accuracy and running time.