A turning
tool wear state monitoring method based on metric learning comprises the steps: preprocessing a collected
tool wear image and then randomly dividing the image into a
training set and a testset in proportion, wherein the
training set and the
test set are each divided into a support set and a
test sample set; establishing a non-parameterized neural
network model structure, wherein the non-parameterized neural
network model structure comprises a
feature extraction network, a distance metric function and an action mechanism; initializing weight, deviation and learning rate parameters ofthe
feature extraction network model, and constructing an
activation function; taking a
cosine distance function as a distance metric function, wherein the Attention mechanism uses a softmax layer structure, and the Attention mechanism uses a softmax layer structure; calculating the current
cross entropy loss by using
forward propagation, and calculating the gradient of the current cross entropyloss through
backward propagation; optimizing the weight and the deviation by operating a
gradient descent method; and finally predicting, classifying and distinguishing the
test set by using the learning parameters of the network model, and outputting the prediction accuracy. The method has the characteristics of
simple algorithm implementation, error correction, high
tool wear state classification accuracy, short
operation time, strong real-time performance and the like.