Erfahre, welche wichtige Rolle Rückrufe beim maschinellen Lernen spielen - Werkzeuge, die das Modelltraining überwachen, steuern und automatisieren, um die Genauigkeit, Flexibilität und Effizienz zu verbessern.
In machine learning, particularly during the complex process of training neural networks, a Callback is a powerful utility. It's essentially an object or function designed to perform specific actions at various stages of a procedure, most commonly during model training or evaluation. Think of callbacks as automated hooks or triggers that allow you to monitor internal states, observe model statistics, make decisions, or execute custom code without manually interrupting the training process. They provide a crucial mechanism for customizing and controlling the behavior of training loops and other sequential operations within popular deep learning (DL) frameworks like TensorFlow and PyTorch.
Callbacks operate based on an event-driven system. They are typically passed as a list to a main function, such as a train
method within a machine learning (ML) framework. The framework is designed to call these callbacks at specific points, known as "events." Common events include the beginning or end of the entire training process, the start or end of an Epoche, or even before or after processing a single Losgröße of data. When a specific event occurs, the framework executes the corresponding callback function(s), often passing relevant information about the current state—like the current epoch number, Verlustfunktion value, or performance metrics—as arguments. This allows the callback to dynamically interact with and influence the ongoing process based on real-time information.
Callbacks are incredibly versatile and enable a wide range of functionalities essential for effective model development and training:
Integrating callbacks into the machine learning workflow offers several significant advantages:
Frameworks like Keras and PyTorch Lightning offer extensive collections of built-in callbacks and straightforward interfaces for creating custom ones. Ultralytics also leverages callbacks internally within its training pipelines, contributing to the robustness and user-friendliness of tools like Ultralytics YOLO11 and the Ultralytics HUB platform. Consulting the Ultralytics documentation can provide more specific examples related to YOLO model training.