A method for identifying an unknown target in a complex environment by using an all-
optical diffraction neural network is characterized in that the adopted all-
optical diffraction neural network is composed of multiple
layers of phase-type
diffraction optical elements, multiple
wavefront regulation and control can be performed on a
light field corresponding to an input image, and classification and identification of the image are completed in an optical domain after
diffraction propagation of a certain distance; on the basis of a
diffraction neural network, an anti-interference recognition mechanism is provided, concepts of a target object and an interferent which need to be specifically classified are provided in a diffraction neural network training stage, and a
loss function and a constraint condition are set respectively; in combination with a
wavelength multiplexing mechanism, different target object classification tasks are independently processed under different
wavelength channels, so that classification results of all
wavelength channels are integrated in a full-
wave band range, the classification task of unknown targets in a complex environment is realized, and the advantages of high speed and low
energy consumption of the all-
optical diffraction neural network are exerted. The limitations of simple application scene,
small target number and the like of the
optical neural network are overcome.