The invention provides a method for training an end-to-end automatic driving strategy, and the method comprises the following steps: S1, data collection and preprocessing, S2, defining a
loss function and an optimizer, and constructing a model, S3, data division, S4, model training, S5, evaluation on a
verification set, S6, model adjustment and optimization, and S7,
test set evaluation. S8, weight
pruning and evaluation: calculating and evaluating the importance of each weight by adopting a gradient norm calculation mode, evaluating the model after weight
pruning by using the
test set in the step S7 according to an importance
evaluation result, starting from a relatively small proportion, gradually increasing and removing unimportant weights, and if the performance of the model does not reach the standard at the moment, evaluating the model after weight
pruning by using the
test set in the step S7. According to the method, through weight pruning, the applicability of a
model system is wider, and the training efficiency of the
system is higher.