One of the directions of development within the framework of the neuromorphic approach is the development of anatomically similar models of brain networks, taking into account the structurally complex structure of neurons and the adaptation of connections between them, as well as the development of learning algorithms for such models. In this work, we use the previously presented compartmental spike model of a neuron, which describes the structure (dendritic tree, soma, synapses) and behaviour (temporal and spatial signal summation, generation of action potential, stimulation and suppression of electrical activity) of a biological neuron. An algorithm for the structural organization of neuron models into a spike neural network is proposed for recognizing an arbitrary impulse pattern by introducing inhibitory synapses between trained neuron models. The dynamically adapting neuron models used are trained according to a previously proposed algorithm that automatically selects parameters such as soma size, dendrite length, and the number of synapses on each of the dendrites in order to induce a temporal response at the output depending on the input pattern encoded using a time window and temporal delays in the vector of single spikes arriving at a separate dendrite of a neuron. The developed algorithms are evaluated on the Iris dataset classification problem with four training examples from each class. As a result of the classification, separate disjoint clusters are formed, which demonstrates the applicability of the proposed spike neural network with a dynamically changing structure of elements in the problem of pattern recognition and classification.