The flow pattern in a pipeline is a very important topic in petroleum exploitation. This paper is to classify the flow pattern of oil-gas-water flow in a pipeline by using BP neural network. The effects of different parameter combinations are investigated to find the most important ones. It is shown that BP neural network can be used in the analysis of the flow pattern of three-phase flow in pipelines. In most cases, the mean square error is large for the horizontal pipes. The optimized neuron number of the middle layer changes with conditions. So we must changes the neuron number of the middle layer in simulation for any conditions to seek the best results. These conclusions can be taken as references for further study of the flow pattern of oil-gas-water in a pipeline.