Tree structure neural network