A method for training an image recognition model, executable by an electronic device, characterized by the method comprising: obtaining image sets to be trained, the image sets to be trained comprising at least a first image set, a second image set, and a third image set, the first image set comprising at least one first image, the second image set comprising at least one second image and at least one perturbed image, the third image set comprising at least one third image, the first image being a labeled image corresponding to a first task, the second image being an unlabeled image corresponding to the first task, the third image being a labeled image corresponding to a second task, the first task and the second task being different tasks; obtaining a first predicted probability, a second predicted probability, a third predicted probability, and a fourth predicted probability based on the image sets to be trained by using an image recognition model to be trained, the first predicted probability being a predicted result outputted based on the first image set, the second predicted probability and the third predicted probability being predicted results outputted based on the second image set, and the fourth predicted probability being a predicted result outputted based on the third image set; determining a target loss function according to the first predicted probability, the second predicted probability, the third predicted probability, and the fourth predicted probability, the target loss function comprising at least a first loss function determined according to the first predicted probability, a second loss function determined according to the second predicted probability and the third predicted probability, and a third loss function determined according to the fourth predicted probability, the target loss function further comprising an entropy loss function and a regularization loss function, and the target loss function is a weighted sum of the first loss function, the second loss function, the third loss function, the entropy loss function and the regularization loss function; and training the image recognition model to be trained based on the target loss function, to obtain an image recognition model. obtaining image sets to be trained, the image sets to be trained comprising at least a first image set, a second image set, and a third image set, the first image set comprising at least one first image, the second image set comprising at least one second image and at least one perturbed image, the third image set comprising at least one third image, the first image being a labeled image corresponding to a first task, the second image being an unlabeled image corresponding to the first task, the third image being a labeled image corresponding to a second task, the first task and the second task being different tasks; obtaining a first predicted probability, a second predicted probability, a third predicted probability, and a fourth predicted probability based on the image sets to be trained by using an image recognition model to be trained, the first predicted probability being a predicted result outputted based on the first image set, the second predicted probability and the third predicted probability being predicted results outputted based on the second image set, and the fourth predicted probability being a predicted result outputted based on the third image set; determining a target loss function according to the first predicted probability, the second predicted probability, the third predicted probability, and the fourth predicted probability, the target loss function comprising at least a first loss function determined according to the first predicted probability, a second loss function determined according to the second predicted probability and the third predicted probability, and a third loss function determined according to the fourth predicted probability, the target loss function further comprising an entropy loss function and a regularization loss function, and the target loss function is a weighted sum of the first loss function, the second loss function, the third loss function, the entropy loss function and the regularization loss function; and training the image recognition model to be trained based on the target loss function, to obtain an image recognition model.