[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-27 UTC"],[[["\u003cp\u003eMachine learning models can be trained statically (once) or dynamically (continuously).\u003c/p\u003e\n"],["\u003cp\u003eStatic training is simpler but can become outdated if data patterns change, requiring data monitoring.\u003c/p\u003e\n"],["\u003cp\u003eDynamic training adapts to new data, providing more accurate predictions but demands more resources and monitoring.\u003c/p\u003e\n"],["\u003cp\u003eChoosing between static and dynamic training depends on the specific dataset and how frequently it changes.\u003c/p\u003e\n"],["\u003cp\u003eMonitoring input data is essential for both static and dynamic training to ensure reliable predictions.\u003c/p\u003e\n"]]],[],null,["Broadly speaking, you can train a model in either of two ways:\n\n- [**Static training**](/machine-learning/glossary#static) (also called **offline training**) means that you train a model only once. You then serve that same trained model for a while.\n- [**Dynamic training**](/machine-learning/glossary#dynamic) (also called **online training**) means that you train a model continuously or at least frequently. You usually serve the most recently trained model.\n\n**Figure 2.** Static training. Train once; serve the same built model multiple times. (Images by Pexels and by fancycrave1.)\n\n**Figure 3.** Dynamic training. Retrain frequently; serve the most recently built model. (Images by Pexels and by Couleur.)\n\n**Table 1.** Primary advantages and disadvantages.\n\n| | Static training | Dynamic training |\n| Advantages | **Simpler.** You only need to develop and test the model once. | **More adaptable.** Your model will keep up with any changes to the relationship between features and labels. |\n| Disadvantages | **Sometimes staler.** If the relationship between features and labels changes over time, your model's predictions will degrade. | **More work.** You must build, test, and release a new product all the time. |\n|---------------|---------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|\n\nIf your dataset truly isn't changing over time, choose static training because\nit is cheaper to create and maintain than dynamic training. However, datasets\ntend to change over time, even those with features that you think are as\nconstant as, say, sea level. The takeaway: even with static\ntraining, you must still monitor your input data for change.\n\nFor example, consider a model trained to predict the probability that users\nwill buy flowers. Because of time pressure, the model is trained only once\nusing a dataset of flower buying behavior during July and August.\nThe model works fine for several months but then makes terrible predictions\naround [Valentine's Day](https://wikipedia.org/wiki/Valentine's_Day) because\nuser behavior during that floral holiday period changes dramatically.\n\nFor a more detailed exploration of static and dynamic training, see the\n[Managing ML Projects](/machine-learning/managing-ml-projects/pipelines)\ncourse.\n\nExercises: Check your understanding \nWhich **two** of the following statements are true about static (offline) training? \nThe model stays up to date as new data arrives. \nActually, if you train offline, then the model has no way to incorporate new data as it arrives. This can lead to model staleness, if the distribution you are trying to learn from changes over time. \nYou can verify the model before applying it in production. \nYes, offline training gives ample opportunity to verify model performance before introducing the model in production. \nOffline training requires less monitoring of training jobs than online training. \nIn general, monitoring requirements at training time are more modest for offline training, which insulates you from many production considerations. However, the more frequently you train your model, the higher the investment you'll need to make in monitoring. You'll also want to validate regularly to ensure that changes to your code (and its dependencies) don't adversely affect model quality. \nVery little monitoring of input data needs to be done at inference time. \nCounterintuitively, you do need to monitor input data at serving time. If the input distributions change, then our model's predictions may become unreliable. Imagine, for example, a model trained only on summertime clothing data suddenly being used to predict clothing buying behavior in wintertime. \nWhich **one** of the following statements is true of dynamic (online) training? \nThe model stays up to date as new data arrives. \nThis is the primary benefit of online training; you can avoid many staleness issues by allowing the model to train on new data as it comes in. \nVery little monitoring of training jobs needs to be done. \nActually, you must continuously monitor training jobs to ensure that they are healthy and working as intended. You'll also need supporting infrastructure like the ability to roll a model back to a previous snapshot in case something goes wrong in training, such as a buggy job or corruption in input data. \nVery little monitoring of input data needs to be done at inference time. \nJust like a static, offline model, it is also important to monitor the inputs to the dynamically updated models. You are likely not at risk for large seasonality effects, but sudden, large changes to inputs (such as an upstream data source going down) can still cause unreliable predictions.\n| **Key terms:**\n|\n| - [Dynamic training](/machine-learning/glossary#dynamic)\n- [Static training](/machine-learning/glossary#static) \n[Help Center](https://support.google.com/machinelearningeducation)"]]