The document proposes a boundary dependent physics-informed neural network (BDPINN) method for solving the neutron transport equation (NTE). BDPINN transforms the NTE into an optimization problem by defining a loss function based on a trial function that satisfies the boundary conditions. Three techniques are introduced to improve the accuracy of BDPINN for NTE: 1) using a third-order tensor to transform integral terms and avoid expression swell, 2) rearranging the training set to reduce errors near interfaces, and 3) reconstructing the result in high order to reduce ray effects caused by angle discretization. The accuracy of BDPINN is verified through benchmark comparisons and it provides a novel approach for solving the challenging NTE.