התחל עם אופטימיזציה של מודל TensorFlow
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
1. בחר את הדגם הטוב ביותר למשימה
בהתאם למשימה, תצטרך לעשות פשרה בין מורכבות המודל לגודל. אם המשימה שלך דורשת דיוק גבוה, ייתכן שתצטרך דגם גדול ומורכב. עבור משימות הדורשות פחות דיוק, עדיף להשתמש בדגם קטן יותר מכיוון שהם לא רק מצריכים פחות שטח דיסק וזיכרון, אלא שהם גם בדרך כלל מהירים יותר וחסכוניים יותר באנרגיה.
2. מודלים מותאמים מראש
בדוק אם דגמים קיימים של TensorFlow Lite מותאמים מראש מספקים את היעילות הנדרשת על ידי היישום שלך.
3. כלי עבודה לאחר אימון
אם אינך יכול להשתמש במודל מיומן מראש עבור היישום שלך, נסה להשתמש בכלי קוונטיזציה לאחר אימון של TensorFlow Lite במהלך המרה של TensorFlow Lite , שיכולים לייעל את מודל ה- TensorFlow שכבר עבר הכשרה שלך.
עיין במדריך הקוונטיזציה שלאחר ההדרכה למידע נוסף.
אם הפתרונות הפשוטים שלעיל אינם מספקים את הצרכים שלך, ייתכן שיהיה עליך לערב טכניקות אופטימיזציה בזמן האימון. בצע אופטימיזציה נוספת עם הכלים שלנו בזמן האימון וחפור לעומק.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],[],null,["# Get started with TensorFlow model optimization\n\n\u003cbr /\u003e\n\n1. Choose the best model for the task\n-------------------------------------\n\nDepending on the task, you will need to make a tradeoff between model complexity\nand size. If your task requires high accuracy, then you may need a large and\ncomplex model. For tasks that require less precision, it is better to use a\nsmaller model because they not only use less disk space and memory, but they are\nalso generally faster and more energy efficient.\n\n2. Pre-optimized models\n-----------------------\n\nSee if any existing\n[TensorFlow Lite pre-optimized models](https://www.tensorflow.org/lite/models)\nprovide the efficiency required by your application.\n\n3. Post-training tooling\n------------------------\n\nIf you cannot use a pre-trained model for your application, try using\n[TensorFlow Lite post-training quantization tools](./quantization/post_training)\nduring [TensorFlow Lite conversion](https://www.tensorflow.org/lite/convert),\nwhich can optimize your already-trained TensorFlow model.\n\nSee the\n[post-training quantization tutorial](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/performance/post_training_quant.ipynb)\nto learn more.\n\nNext steps: Training-time tooling\n---------------------------------\n\nIf the above simple solutions don't satisfy your needs, you may need to involve\ntraining-time optimization techniques.\n[Optimize further](/model_optimization/guide/optimize_further) with our training-time tools and dig\ndeeper."]]