Majid Al-RaimiNetAdapt: platform-aware pruning to a latency budgetNetAdapt: تقليم واعٍ بالمنصة حتى ميزانية زمن استجابة

COE 592Lecture 4.2المحاضرة 4.2Part 05الجزء 05

NetAdapt: platform-aware pruning to a latency budgetNetAdapt: تقليم واعٍ بالمنصة حتى ميزانية زمن استجابة

A rule-based automatic method that removes latency in fixed steps, tries pruning each layer with a measured latency lookup table, keeps the layer whose short fine-tune loses the least accuracy, and produces a whole series of models.طريقة آلية قائمة على القواعد تزيل زمن الاستجابة بخطوات ثابتة، وتجرب تقليم كل طبقة باستخدام جدول بحث لزمن الاستجابة المقاس، وتحتفظ بالطبقة التي يفقد ضبطها الدقيق القصير أقل دقة، وتنتج سلسلة كاملة من النماذج.

Conceptsالمفاهيم
2
Slidesالشرائح
33-40
Readingمدة القراءة
12 min12 دقيقة
Understoodما فهمته
0/2 conceptsمفاهيم

Why this part mattersلماذا يهمّ هذا الجزء

Your edge deployments do not start from a FLOPs target. They start from a latency spec on a specific board: the camera pipeline must answer in 7 ms on this phone, or the classifier must fit one frame period on that microcontroller. NetAdapt is the pruning method built for that situation. It takes a pretrained network, a measured latency budget and the device itself, and hands back a network that meets the budget.

It is also the rule-based counterpart to AMC from part 04, so exam questions like to contrast the two, and it is the finishing step inside MobileNetV3. This part walks the loop once in words, once as a worked example you can redo by hand, and once in a simulator, then shows why a single run leaves you with a whole family of models rather than one.

مشاريعك على أجهزة الحافة (edge) لا تبدأ من هدف بعدد الـ FLOPs. إنها تبدأ من مواصفة latency على لوحة محددة: يجب أن يستجيب مسار الكاميرا خلال 7 ms على هذا الهاتف، أو يجب أن يتسع المصنِّف لفترة إطار واحد على ذلك المتحكم الدقيق (microcontroller). NetAdapt هي طريقة الـ pruning المصممة لهذا الموقف بالذات. تأخذ شبكة مدرَّبة مسبقًا، وميزانية latency مقيسة، والجهاز نفسه، وتعيد لك شبكة تحقق الميزانية.

وهي أيضًا النظير القائم على القواعد (rule-based) لـ AMC من الجزء 04، لذلك تحب أسئلة الاختبار المقارنة بينهما، وهي كذلك الخطوة الأخيرة داخل MobileNetV3. يمر هذا الجزء على الحلقة مرة بالكلمات، ومرة كمثال محلول تستطيع إعادته يدويًا، ومرة في محاكٍ، ثم يبيّن لماذا يترك لك تشغيل واحد عائلة كاملة من النماذج بدل نموذج واحد.

By the end you canفي نهاية هذا الجزء ستستطيع

  1. Write the NetAdapt loop from memory: Delta R, one proposal per layer, lookup table, short-term fine-tune, pick the highest accuracy, repeat, long-term fine-tune.اكتب حلقة NetAdapt من الذاكرة: Delta R، ومقترح (proposal) واحد لكل طبقة، وجدول البحث (lookup table)، ثم short-term fine-tune، ثم اختيار المقترح الأعلى دقة، ثم التكرار، وأخيرًا long-term fine-tune.
  2. Explain why a measured per-layer latency lookup table beats counting FLOPs, using the 19 percent fewer MACs but 29 percent slower example.اشرح لماذا يتفوق جدول بحث يقيس الـ latency لكل طبقة على عدّ الـ FLOPs، مستخدمًا مثال الشبكة التي فيها MACs أقل بنسبة 19 بالمئة لكنها أبطأ بنسبة 29 بالمئة.
  3. Run three iterations by hand on a four-layer network and bring it from 10.0 ms under a 7.0 ms budget.نفّذ ثلاثة تكرارات يدويًا على شبكة من أربع طبقات، وأنزلها من 10.0 ms إلى ما دون ميزانية 7.0 ms.
  4. Contrast NetAdapt with AMC on who decides the ratios, the cost model, the fine-tuning and what comes out.قارن NetAdapt مع AMC من حيث: من يقرر النسب، ونموذج الكلفة، والـ fine-tuning، وما الذي يخرج في النهاية.
  5. Explain why one run yields a whole accuracy versus latency frontier and read the slide 40 chart.اشرح لماذا يعطي تشغيل واحد منحنى (frontier) كاملًا للمفاضلة بين الدقة والـ latency، واقرأ الرسم في الشريحة 40.

Suppose a pretrained MobileNet runs in 10.0 ms on one core of a Pixel 1 and the product needs 7.0 ms. The Sensitivity analysis of part 03 cannot help directly, because its curves are in accuracy versus Pruning ratio, not milliseconds, and it ignores Layer interaction. AMC (AutoML for Model Compression) from part 04 could be pointed at latency, but it needs a reinforcement learning agent and a training loop of its own. NetAdapt asks a much simpler question, and asks it many times: which single layer can I thin right now so that latency falls by a fixed step while accuracy falls the least?

لنفترض أن شبكة MobileNet مدرَّبة مسبقًا تعمل في 10.0 ms على نواة واحدة من هاتف Pixel 1، والمنتج يحتاج إلى 7.0 ms. لا يستطيع sensitivity analysis من الجزء 03 أن يساعد مباشرة، لأن منحنياته تعبّر عن الدقة مقابل pruning ratio، لا بالملّي ثانية، كما أنه يتجاهل layer interaction. ويمكن توجيه AMC من الجزء 04 نحو الـ latency، لكنه يحتاج إلى وكيل تعلّم معزَّز (reinforcement learning agent) وحلقة تدريب خاصة به. أما NetAdapt فيطرح سؤالًا أبسط بكثير، ويطرحه مرات كثيرة: ما الطبقة الواحدة التي أستطيع ترقيقها الآن بحيث تنخفض الـ latency بخطوة ثابتة بينما تنخفض الدقة بأقل قدر ممكن؟

The slides call it a rule-based iterative, or progressive, method, and every word matters. Rule-based means no learned policy: the decision each round is a comparison of measured numbers. Iterative means the budget is reached in many small steps rather than one cut. Progressive means each step starts from the winner of the previous one. It is Automated pruning in the sense of part 04, because nobody hand-picks per-layer ratios, but the automation is a loop you could run with a spreadsheet.

تسميها الشرائح طريقة تكرارية، أو تدريجية (progressive)، قائمة على القواعد (rule-based)، وكل كلمة هنا مهمة. القائمة على القواعد تعني عدم وجود سياسة متعلَّمة (learned policy): القرار في كل جولة هو مقارنة بين أرقام مقيسة. التكرارية تعني أن الميزانية تُبلغ عبر خطوات صغيرة كثيرة بدل قطع واحد. والتدريجية تعني أن كل خطوة تبدأ من الفائز في الخطوة السابقة. إنها automated pruning بمعنى الجزء 04، لأن أحدًا لا يختار نسب كل طبقة يدويًا، لكن الأتمتة هنا حلقة تستطيع تشغيلها بجدول بيانات (spreadsheet).

The problem, and the trick of tightening it slowlyالمسألة، وحيلة تضييقها ببطء

Yang et al. state the goal as a constrained optimization. Accuracy should be as high as possible while every resource of interest (latency, energy, model size) stays under its budget.

يصوغ Yang et al. الهدف كمسألة تحسين مقيَّدة (constrained optimization). يجب أن تكون الدقة أعلى ما يمكن بينما يبقى كل مورد مهم (الـ latency، والطاقة، وحجم النموذج) تحت ميزانيته.

max⁡Net  Acc(Net)subject toResj(Net)≤Budj,  j=1,…,m\max_{\text{Net}} \; \text{Acc}(\text{Net}) \quad \text{subject to} \quad \text{Res}_j(\text{Net}) \le \text{Bud}_j,\; j = 1, \dots, m
NetAdapt, Eq. 1: the global problemNetAdapt، المعادلة 1: المسألة الكلية

Solving that in one shot is hopeless, so the paper breaks it into a chain of easier problems. At iteration i the constraint is not the final budget but the previous network's resource use minus a step ΔR.

حل هذه المسألة دفعة واحدة ميؤوس منه، لذلك تقسمها الورقة إلى سلسلة من المسائل الأسهل. عند التكرار i لا يكون القيد هو الميزانية النهائية، بل استهلاك الشبكة السابقة للمورد ناقص خطوة ΔR.

max⁡Neti  Acc(Neti)subject toResj(Neti)≤Resj(Neti−1)−ΔRi,j\max_{\text{Net}_i} \; \text{Acc}(\text{Net}_i) \quad \text{subject to} \quad \text{Res}_j(\text{Net}_i) \le \text{Res}_j(\text{Net}_{i-1}) - \Delta R_{i,j}
NetAdapt, Eq. 2: the per-iteration problemNetAdapt، المعادلة 2: المسألة في كل تكرار

The paper calls ΔR the resource reduction schedule and compares it to a learning-rate schedule. In the small MobileNetV1 experiments it starts at 0.5 ms and decays by 0.96 every iteration; for larger networks the initial step is scaled with the network's latency. The slides simplify this to a manually defined constant, and the worked example below does the same. Think of it as a progressive barrier: each round the wall moves in a little, and the network only has to squeeze past the new wall, never the final one.

تسمي الورقة ΔR بـ resource reduction schedule (جدول تقليص المورد) وتشبّهه بجدول معدل التعلّم (learning-rate schedule). في تجارب MobileNetV1 الصغيرة يبدأ عند 0.5 ms ويتناقص بمعامل 0.96 في كل تكرار؛ أما في الشبكات الأكبر فتُقاس الخطوة الابتدائية بحسب latency الشبكة. تبسّط الشرائح ذلك إلى ثابت يُحدَّد يدويًا، والمثال المحلول أدناه يفعل الشيء نفسه. تخيّله كحاجز تدريجي: في كل جولة يتقدم الجدار قليلًا إلى الداخل، ولا يُطلب من الشبكة إلا أن تعبر من الجدار الجديد، لا من الجدار النهائي أبدًا.

One layer thinned per candidate column, the ring lands on the candidate with the highest accuracy, and the loop returns to the modelطبقة واحدة تُرقَّق في كل عمود مرشح، وتستقر الحلقة على المرشح الأعلى دقة، ثم تعود الحلقة إلى النموذج

One iteration, step by stepتكرار واحد، خطوة بخطوة

Read slides 34 to 39 as a single loop body. The paper's Algorithm 1 has the same shape, with K equal to the number of convolutional and fully connected layers, so a network with K such layers produces K proposals per iteration.

اقرأ الشرائح من 34 إلى 39 كجسم حلقة واحد. للخوارزمية Algorithm 1 في الورقة الشكل نفسه، حيث K يساوي عدد طبقات الـ convolution والطبقات الكاملة الاتصال (fully connected)، لذلك تنتج شبكة فيها K من هذه الطبقات K مقترحات في كل تكرار.

Measureقِس
Res_0 on the deviceRes_0 على الجهاز

Time the pretrained network on the target once. Everything after this reads tables.

قِس زمن الشبكة المدرَّبة مسبقًا على الجهاز المستهدف مرة واحدة. كل ما بعد ذلك يقرأ من الجداول.

tightenضيّق
Set the constraintحدّد القيد
Con = Res minus ΔR

The target for this round is only ΔR below the current latency.

الهدف في هذه الجولة أقل من زمن الاستجابة الحالي بمقدار ΔR فقط.

for each layer kلكل طبقة k
Proposeاقترح
K candidatesK مرشحًا

Pick the largest filter count whose summed table latency meets Con, keep the largest-l2 filters, short-term fine-tune, measure.

اختر أكبر عدد مرشحات يحقق مجموع زمنه في الجدول القيد Con، واحتفظ بالمرشحات ذات أكبر معيار l2، ثم اضبط ضبطًا دقيقًا قصير المدى وقِس.

The NetAdapt loop body, first half: measure once, tighten by Delta R, propose one cut per layerجسم حلقة NetAdapt، النصف الأول: قِس مرة واحدة، ضيّق القيد بمقدار Delta R، واقترح قطعًا واحدًا لكل طبقة
Pickاختر
highest holdout accuracyأعلى دقة على بيانات الاحتفاظ

Net_(i+1) is the proposal with the best accuracy. Its latency becomes Res_(i+1).

Net_(i+1) هو المقترح صاحب أفضل دقة، ويصبح زمن استجابته Res_(i+1).

Res > Bud
Repeatكرّر
until Res <= Budحتى Res <= Bud

Every iteration starts from the previous winner and moves the wall in by ΔR again.

يبدأ كل تكرار من الفائز السابق ويقرّب الجدار مرة أخرى بمقدار ΔR.

Res <= Bud
Long-term fine-tuneضبط دقيق طويل المدى
once, to convergenceمرة واحدة حتى التقارب

Recover accuracy on the final architecture. This is the number you report.

استعد الدقة على البنية النهائية. هذا هو الرقم الذي تعلنه.

After the K proposals: pick one, loop while over budget, then fine-tune for realبعد المقترحات الـ K: اختر واحدًا، وكرّر ما دمت فوق الميزانية، ثم نفّذ الـ fine-tune الحقيقي
  1. Set the constraint for this round: Con = Res_i minus ΔR_i.حدّد قيد هذه الجولة: Con = Res_i minus ΔR_i.
  2. For each layer L_k, choose the number of filters to keep, from the lookup table, so the whole network meets Con; then choose which filters to keep by l2 magnitude.لكل طبقة L_k، اختر من جدول البحث عدد الـ filters التي تُبقيها بحيث تحقق الشبكة كلها Con؛ ثم اختر أي الـ filters تُبقي بحسب l2 magnitude.
  3. Short-term fine-tune that proposal (the slides say about 10k iterations) and measure its accuracy on a holdout set.نفّذ short-term fine-tune لذلك المقترح (تقول الشرائح نحو 10k تكرار) وقِس دقته على مجموعة holdout.
  4. Keep the proposal with the highest accuracy; it becomes the starting point of the next iteration.احتفظ بالمقترح الأعلى دقة؛ فهو يصبح نقطة البداية للتكرار التالي.
  5. Repeat while the latency is still above the budget.كرّر ما دامت الـ latency فوق الميزانية.
  6. Long-term fine-tune the final network until convergence.نفّذ long-term fine-tune على الشبكة النهائية حتى التقارب (convergence).

Why a lookup table and not FLOPsلماذا جدول بحث وليس FLOPs

The constraint in Eq. 2 is a latency, so the loop needs to know the latency of every proposal, and there are K of them per iteration. Timing each one on the phone is slow and hard to parallelize. NetAdapt instead builds a Latency lookup table per layer before the loop starts: for every shape a layer might take (input channels, output channels, resolution), measure it once on the device and store the number. Layers that share a shape share an entry. The latency of a whole proposal is then the sum of its layers' entries. The paper's own illustration is a two-layer network where layer 1 with 4 filters on a 3-channel input costs 6 ms, and layer 2 with 6 filters on the 4 channels that layer 1 now produces costs 4 ms, so the network is estimated at 6 + 4 = 10 ms. Notice that the second entry is indexed by the first layer's filter count, which is how the table accounts for the removed input channels. A table indexed by whole networks would grow exponentially with depth; a table per layer grows linearly.

القيد في Eq. 2 هو latency، لذلك تحتاج الحلقة إلى معرفة latency كل مقترح، وعددها K في كل تكرار. قياس كل واحد منها على الهاتف بطيء ويصعب تنفيذه بالتوازي. بدلًا من ذلك يبني NetAdapt جدول latency lookup table لكل طبقة قبل أن تبدأ الحلقة: لكل شكل قد تأخذه الطبقة (قنوات الإدخال، وقنوات الإخراج، والدقة المكانية resolution)، يُقاس مرة واحدة على الجهاز ويُخزَّن الرقم. الطبقات التي تتشارك الشكل نفسه تتشارك المدخل نفسه. عندئذ تكون latency المقترح كله مجموع مدخلات طبقاته. المثال التوضيحي في الورقة شبكة من طبقتين: الطبقة 1 فيها 4 filters على إدخال من 3 قنوات وكلفتها 6 ms، والطبقة 2 فيها 6 filters على القنوات الـ 4 التي تنتجها الطبقة 1 الآن وكلفتها 4 ms، فتُقدَّر الشبكة بـ 6 + 4 = 10 ms. لاحظ أن المدخل الثاني مفهرس بعدد filters الطبقة الأولى، وبهذه الطريقة يحتسب الجدول قنوات الإدخال المحذوفة. الجدول المفهرس بشبكات كاملة سيكبر أُسّيًا مع العمق؛ أما جدول لكل طبقة فيكبر خطيًا.

Why not skip the measurement and count multiply-accumulates? Because MACs are an indirect metric, and their relation to latency is neither linear nor the same across devices. The paper makes the point with a striking table: a network guided by MACs ended up with 19% fewer MACs than the baseline and 29% longer latency on a Pixel 1 CPU.

لماذا لا نتجاوز القياس ونعدّ عمليات الضرب والجمع (multiply-accumulates)؟ لأن الـ MACs مقياس غير مباشر، وعلاقتها بالـ latency ليست خطية وليست واحدة عبر الأجهزة. توضح الورقة ذلك بجدول لافت: شبكة موجَّهة بالـ MACs انتهت بعدد MACs أقل من الأساس (baseline) بنسبة 19% وبـ latency أطول بنسبة 29% على معالج Pixel 1.

NetworkالشبكةTop-1Top-1MACsMACsLatencyالـ Latency
25% MobileNetV1 (128)25% MobileNetV1 (128)45.1%45.1%13.6 M (100%)13.6 M (100%)4.65 ms (100%)4.65 ms (100%)
MorphNetMorphNet46.0%46.0%15.0 M (110%)15.0 M (110%)6.52 ms (140%)6.52 ms (140%)
NetAdapt guided by MACsNetAdapt موجَّهًا بالـ MACs46.3%46.3%11.0 M (81%)11.0 M (81%)6.01 ms (129%)6.01 ms (129%)
Table 1 of the NetAdapt paper: fewer MACs does not mean faster (Pixel 1 CPU, 128 by 128 input)الجدول 1 في ورقة NetAdapt: الـ MACs الأقل لا تعني سرعة أكبر (معالج Pixel 1، إدخال 128 في 128)

The lesson carries over to your own boards. Memory traffic, kernel launch overheads, cache behaviour and how well a library tiles a particular layer shape all change latency without changing the MAC count. The honest number is the one the device reports, and the lookup table is a cheap way to have that number on hand for every candidate. The paper checks the approximation on a Pixel 1 and finds the summed estimate highly correlated with the real measurement. Part 04 noted that AMC can also use a pre-built lookup table to optimize latency; NetAdapt makes it the default rather than an option.

هذا الدرس ينطبق على لوحاتك أنت أيضًا. حركة الذاكرة، وكلفة إطلاق الـ kernel، وسلوك الذاكرة المخبئية (cache)، ومدى جودة تقسيم المكتبة لشكل طبقة معيّن إلى بلاطات (tiling)، كلها تغيّر الـ latency دون أن تغيّر عدد الـ MACs. الرقم الصادق هو الذي يُبلغ عنه الجهاز، وجدول البحث طريقة رخيصة لجعل هذا الرقم متاحًا لكل مرشح. تتحقق الورقة من هذا التقريب على Pixel 1 وتجد أن التقدير بالجمع مرتبط بقوة بالقياس الحقيقي. ذكر الجزء 04 أن AMC يمكنه أيضًا استخدام جدول بحث مبني مسبقًا لتحسين الـ latency؛ أما NetAdapt فيجعله الوضع الافتراضي لا مجرد خيار.

Why fine-tune twiceلماذا نُجري الـ fine-tune مرتين

There are two kinds of Fine-tuning in the loop and they serve different purposes. The short-term fine-tune happens once per proposal, so K times per iteration. Its only job is to make the K accuracies comparable. The paper reports that without it, the accuracy of a small network after pruning rapidly drops to nearly zero, and the algorithm then picks the best proposal solely based on noise. With 10k iterations the accuracy stays above 20% and the ranking becomes meaningful.

في الحلقة نوعان من fine-tuning ولكل منهما غرض مختلف. الـ short-term fine-tune يحدث مرة لكل مقترح، أي K مرة في كل تكرار. وظيفته الوحيدة أن يجعل دقّات المقترحات الـ K قابلة للمقارنة. تذكر الورقة أنه بدونه تنهار دقة الشبكة الصغيرة بعد الـ pruning بسرعة إلى ما يقارب الصفر، فتختار الخوارزمية أفضل مقترح بناءً على الضجيج وحده. ومع 10k تكرار تبقى الدقة فوق 20% ويصبح الترتيب ذا معنى.

The long-term fine-tune happens once, after the loop has stopped, and runs until convergence. This is the step that repairs the damage of all the cuts on the final architecture. In the paper it adds between 1.8 and 4.5 points, 3.4 on average, on top of the last short-term number.

أما الـ long-term fine-tune فيحدث مرة واحدة، بعد توقف الحلقة، ويستمر حتى التقارب. هذه هي الخطوة التي تصلح ضرر كل القطوع على البنية النهائية. في الورقة يضيف ما بين 1.8 و4.5 نقطة، 3.4 في المتوسط، فوق آخر رقم من الـ short-term.

A run you can redo by handتشغيل تستطيع إعادته يدويًا

Take a four-layer network with 32, 64, 64 and 128 filters (layers A to D), a measured latency of 10.0 ms and a budget of 7.0 ms. Fix ΔR = 1.0 ms, ten percent of the starting latency. The lookup tables below are illustrative, the accuracies are synthetic, and the effect of one layer's cut on the next layer's input channels is ignored so the sums stay readable. The paper decays ΔR and accounts for the next layer.

خذ شبكة من أربع طبقات فيها 32 و64 و64 و128 filters (الطبقات من A إلى D)، وlatency مقيسة قدرها 10.0 ms، وميزانية قدرها 7.0 ms. ثبّت ΔR = 1.0 ms، أي عشرة بالمئة من الـ latency الابتدائية. جداول البحث أدناه توضيحية، والدقّات اصطناعية، وتأثير قطع طبقة على قنوات الإدخال في الطبقة التالية مُهمَل كي تبقى المجاميع سهلة القراءة. أما الورقة فتُنقص ΔR تدريجيًا وتحتسب أثر الطبقة التالية.

Illustrative latency lookup tables, filters kept: msجداول بحث توضيحية للـ latency، عدد الـ filters المُبقاة: ms

Layer A (32 filters)الطبقة A (32 filter)
32: 3.0, 24: 2.4, 16: 1.8, 8: 1.232: 3.0, 24: 2.4, 16: 1.8, 8: 1.2
Layer B (64 filters)الطبقة B (64 filter)
64: 3.0, 48: 2.3, 32: 1.6, 16: 1.0, 8: 0.564: 3.0, 48: 2.3, 32: 1.6, 16: 1.0, 8: 0.5
Layer C (64 filters)الطبقة C (64 filter)
64: 2.5, 48: 2.0, 32: 1.5, 16: 1.0, 8: 0.564: 2.5, 48: 2.0, 32: 1.5, 16: 1.0, 8: 0.5
Layer D (128 filters)الطبقة D (128 filter)
128: 1.5, 96: 1.2, 64: 0.9, 32: 0.6, 16: 0.4128: 1.5, 96: 1.2, 64: 0.9, 32: 0.6, 16: 0.4

Worked exampleمثال محلول

Three iterations from 10.0 ms to a 7.0 ms budgetثلاثة تكرارات من 10.0 ms إلى ميزانية 7.0 ms

  1. Check the starting pointتحقّق من نقطة البداية

    3.0 + 3.0 + 2.5 + 1.5 = 10.0 ms at 71.0%. Above budget, so the loop runs.
    3.0 + 3.0 + 2.5 + 1.5 = 10.0 ms بدقة 71.0%. هذا فوق الميزانية، لذلك تعمل الحلقة.
  2. Iteration 1, Con = 10.0 minus 1.0 = 9.0 msالتكرار 1، Con = 10.0 minus 1.0 = 9.0 ms

    For each layer, read the largest filter count whose sum meets 9.0 ms, short-term fine-tune the proposal and measure it.

    LayerالطبقةFilters keptالـ filters المُبقاةLayer msms الطبقةTotal msms الإجماليShort-term accدقة الـ short-term
    AA16 of 3216 من 321.81.88.88.861.0%61.0%
    BB32 of 6432 من 641.61.68.68.668.2%68.2%
    C (kept)C (المُختارة)32 of 6432 من 641.51.59.09.069.3%69.3%
    DD16 of 12816 من 1280.40.48.98.967.3%67.3%

    All four proposals meet the constraint, and NetAdapt does not reward going further below it (the 8.6 ms proposal earns nothing for its extra margin), so accuracy alone decides: layer C loses the least. Net_1 = A32 B64 C32 D128, 9.0 ms, 69.3%.

    لكل طبقة، اقرأ أكبر عدد filters يحقق مجموعه 9.0 ms، ونفّذ short-term fine-tune للمقترح وقِسه.

    LayerالطبقةFilters keptالـ filters المُبقاةLayer msms الطبقةTotal msms الإجماليShort-term accدقة الـ short-term
    AA16 of 3216 من 321.81.88.88.861.0%61.0%
    BB32 of 6432 من 641.61.68.68.668.2%68.2%
    C (kept)C (المُختارة)32 of 6432 من 641.51.59.09.069.3%69.3%
    DD16 of 12816 من 1280.40.48.98.967.3%67.3%

    المقترحات الأربعة كلها تحقق القيد، وNetAdapt لا يكافئ النزول أكثر تحته (المقترح ذو 8.6 ms لا يكسب شيئًا من هامشه الإضافي)، لذلك تحسم الدقة وحدها: الطبقة C هي الأقل خسارة. Net_1 = A32 B64 C32 D128، 9.0 ms، 69.3%.

  3. Iteration 2, Con = 9.0 minus 1.0 = 8.0 msالتكرار 2، Con = 9.0 minus 1.0 = 8.0 ms

    Start from Net_1. Layer C already sits at 32, so its next table entry that saves a full millisecond is 8 filters, a much deeper cut.

    LayerالطبقةFilters keptالـ filters المُبقاةLayer msms الطبقةTotal msms الإجماليShort-term accدقة الـ short-term
    AA16 of 3216 من 321.81.87.87.859.2%59.2%
    B (kept)B (المُختارة)32 of 6432 من 641.61.67.67.666.4%66.4%
    CC8 of 648 من 640.50.58.08.065.0%65.0%
    DD16 of 12816 من 1280.40.47.97.965.5%65.5%

    Thinning C again would now cost more than thinning B for the first time, so the greedy rule switches layers. Net_2 = A32 B32 C32 D128, 7.6 ms, 66.4%.

    ابدأ من Net_1. الطبقة C أصبحت عند 32، لذلك فإن مدخلها التالي في الجدول الذي يوفر ملّي ثانية كاملة هو 8 filters، وهو قطع أعمق بكثير.

    LayerالطبقةFilters keptالـ filters المُبقاةLayer msms الطبقةTotal msms الإجماليShort-term accدقة الـ short-term
    AA16 of 3216 من 321.81.87.87.859.2%59.2%
    B (kept)B (المُختارة)32 of 6432 من 641.61.67.67.666.4%66.4%
    CC8 of 648 من 640.50.58.08.065.0%65.0%
    DD16 of 12816 من 1280.40.47.97.965.5%65.5%

    ترقيق C مرة أخرى سيكلف الآن أكثر من ترقيق B لأول مرة، لذلك تنتقل القاعدة الـ greedy إلى طبقة أخرى. Net_2 = A32 B32 C32 D128، 7.6 ms، 66.4%.

  4. Iteration 3, Con = 7.6 minus 1.0 = 6.6 msالتكرار 3، Con = 7.6 minus 1.0 = 6.6 ms

    7.6 ms is still above 7.0 ms, so one more round. Note that the constraint is set from the current latency, not from the budget.

    LayerالطبقةFilters keptالـ filters المُبقاةLayer msms الطبقةTotal msms الإجماليShort-term accدقة الـ short-term
    AA16 of 3216 من 321.81.86.46.456.4%56.4%
    BB8 of 648 من 640.50.56.56.559.6%59.6%
    CC8 of 648 من 640.50.56.66.662.2%62.2%
    D (kept)D (المُختارة)16 of 12816 من 1280.40.46.56.562.7%62.7%

    Layer D, the widest and least sensitive, wins. Net_3 = A32 B32 C32 D16, 6.5 ms, which is at or below 7.0 ms. The loop stops.

    7.6 ms ما زالت فوق 7.0 ms، لذلك نحتاج جولة أخرى. لاحظ أن القيد يُحدَّد من الـ latency الحالية، لا من الميزانية.

    LayerالطبقةFilters keptالـ filters المُبقاةLayer msms الطبقةTotal msms الإجماليShort-term accدقة الـ short-term
    AA16 of 3216 من 321.81.86.46.456.4%56.4%
    BB8 of 648 من 640.50.56.56.559.6%59.6%
    CC8 of 648 من 640.50.56.66.662.2%62.2%
    D (kept)D (المُختارة)16 of 12816 من 1280.40.46.56.562.7%62.7%

    تفوز الطبقة D، الأعرض والأقل حساسية. Net_3 = A32 B32 C32 D16، 6.5 ms، وهي عند 7.0 ms أو دونها. تتوقف الحلقة.

  5. Long-term fine-tuneالـ long-term fine-tune

    Train Net_3 to convergence. Short-term 62.7% becomes 65.2%, a gain of 2.5 points, inside the paper's 1.8 to 4.5 range.
    درّب Net_3 حتى التقارب. دقة الـ short-term البالغة 62.7% تصبح 65.2%، أي مكسب قدره 2.5 نقطة، داخل نطاق الورقة من 1.8 إلى 4.5.
  6. Resultالنتيجة

    Three iterations, three valid networks along the way (9.0, 7.6 and 6.5 ms), a final model at 6.5 ms and 65.2%. Layer A, the first layer, was never chosen, because the synthetic model gives it the highest Layer sensitivity by construction, mirroring the part 03 intuition that early layers are expensive to prune.
    ثلاثة تكرارات، وثلاث شبكات صالحة على طول الطريق (9.0 و7.6 و6.5 ms)، ونموذج نهائي عند 6.5 ms و65.2%. الطبقة A، وهي الطبقة الأولى، لم تُختر أبدًا، لأن النموذج الاصطناعي يعطيها أعلى layer sensitivity عن قصد، بما يعكس حدس الجزء 03 بأن الطبقات المبكرة مكلفة عند تقليمها.
Each iteration cuts latency by at least Delta R until the third step lands under the 7.0 ms budget lineكل تكرار يخفض الـ latency بمقدار Delta R على الأقل حتى تستقر الخطوة الثالثة تحت خط ميزانية 7.0 ms

Now run it yourself. The simulator uses the same tables and the same synthetic accuracy model, so its default run reproduces the example above. Then change the budget or the step and watch which layer gets picked: a smaller ΔR takes more iterations, produces more intermediate models, and tends to end slightly higher in accuracy, which is what the paper's schedule study found.

الآن شغّلها بنفسك. يستخدم المحاكي الجداول نفسها ونموذج الدقة الاصطناعي نفسه، لذلك يعيد تشغيله الافتراضي إنتاج المثال أعلاه. ثم غيّر الميزانية أو الخطوة وراقب أي طبقة تُختار: ΔR الأصغر يحتاج تكرارات أكثر، وينتج نماذج وسيطة أكثر، ويميل إلى الانتهاء بدقة أعلى قليلًا، وهذا ما وجدته دراسة الـ schedule في الورقة.

SimulatorمحاكيNetAdapt stepper: four layers, one latency budgetمتتبع NetAdapt: أربع طبقات، وميزانية زمن استجابة واحدة
  • A32/32
  • B64/64
  • C64/64
  • D128/128
Current latencyزمن الاستجابة الحالي10.0msA32 B64 C64 D128
Next constraintالقيد التالي9.0msRes minus ΔR = 1.0 msRes ناقص ΔR = 1.0 ms
Iterations0so farone layer thinned eachطبقة واحدة تُرقَّق في كل تكرار
Models producedالنماذج الناتجة0networksequals the iteration countيساوي عدد التكرارات

The network starts dense at 10.0 ms and 71.0%. Each press builds one proposal per layer from the lookup table and keeps the one with the highest short-term accuracy.تبدأ الشبكة كثيفة عند 10.0 ms و71.0%. كل ضغطة تبني مقترحًا واحدًا لكل طبقة من جدول البحث، وتحتفظ بالمقترح صاحب أعلى دقة في المدى القصير.

10987654msiterationbudget 7.0 ms0
Latency is above the budget of 7.0 ms. Press Next iteration to tighten the constraint by ΔR and try every layer.زمن الاستجابة أعلى من الميزانية البالغة 7.0 ms. اضغط «التكرار التالي» لتشديد القيد بمقدار ΔR وتجربة كل طبقة.

Lookup tables and accuracies are synthetic. Accuracy is 71.0 minus a per-layer penalty that grows with the fraction of filters removed, so early layer A is expensive to cut and layer C is cheap. The latency effect on the next layer's input channels is ignored for readability.جداول البحث والدقة هنا مصطنعة. الدقة تساوي 71.0 ناقص عقوبة لكل طبقة تكبر مع نسبة المرشحات المحذوفة، لذا فقص الطبقة المبكرة A مكلف وقص الطبقة C رخيص. أُهمل أثر زمن الاستجابة على قنوات الإدخال للطبقة التالية تسهيلًا للقراءة.

NetAdapt against AMCNetAdapt مقابل AMC

Both methods answer the question of part 02, which Pruning ratio for which layer, without a human in the loop, and both were published at the same conference. They differ in almost every mechanism, and the NetAdapt paper even uses AMC (under its earlier name, ADC) as a baseline, beating it by 1.2x in latency on the large MobileNetV1.

كلتا الطريقتين تجيبان عن سؤال الجزء 02، أي pruning ratio لأي طبقة، دون إنسان في الحلقة، وكلتاهما نُشرتا في المؤتمر نفسه. وتختلفان في كل آلية تقريبًا، بل إن ورقة NetAdapt تستخدم AMC (باسمه الأقدم ADC) كخط أساس (baseline) وتتفوق عليه بـ 1.2x في الـ latency على MobileNetV1 الكبيرة.

AspectالجانبAMC (part 04)AMC (الجزء 04)NetAdaptNetAdapt
Who decides the ratiosمن يقرر النسبA DDPG agent learns a policy from rewardsوكيل DDPG يتعلم سياسة (policy) من المكافآتA greedy rule: the proposal with the highest accuracy winsقاعدة greedy: يفوز المقترح الأعلى دقة
Search unitوحدة البحثThe agent visits every layer once per episodeيزور الوكيل كل طبقة مرة واحدة في كل حلقة (episode)One layer changed per iteration, all layers triedتتغير طبقة واحدة في كل تكرار، مع تجربة كل الطبقات
Cost modelنموذج الكلفةFLOPs or latency in the reward, optionally a lookup tableالـ FLOPs أو الـ latency داخل المكافأة، مع جدول بحث اختياريPer-layer latency lookup table measured on the device and summedجدول بحث لـ latency كل طبقة، مقيس على الجهاز ومجموع
Fine-tuningFine-tuningOne fine-tune of the final networkfine-tune واحد للشبكة النهائيةShort-term per proposal, long-term once at the endshort-term لكل مقترح، وlong-term مرة واحدة في النهاية
OutputالمُخرَجOne model per targetنموذج واحد لكل هدفA model at every iteration, the whole frontierنموذج عند كل تكرار، أي المنحنى (frontier) كاملًا
Interpretabilityقابلية التفسيرA learned policyسياسة متعلَّمةEvery pick is explainable from measurementsكل اختيار قابل للتفسير من القياسات
PaperالورقةHe et al., ECCV 2018He et al., ECCV 2018Yang et al., ECCV 2018Yang et al., ECCV 2018
AMC versus NetAdaptAMC مقابل NetAdapt

Recall

List the NetAdapt steps of one iteration in order.اذكر خطوات تكرار واحد في NetAdapt بالترتيب.

Set Con = Res minus ΔR. For each layer k: choose from the lookup table the largest filter count whose summed latency meets Con, keep the filters with the largest l2 norm, short-term fine-tune, measure holdout accuracy. Pick the proposal with the highest accuracy. Repeat while the latency is above the budget. Long-term fine-tune once at the end.
حدّد Con = Res minus ΔR. لكل طبقة k: اختر من جدول البحث أكبر عدد filters تحقق latency مجموعه Con، واحتفظ بالـ filters ذات أكبر l2 norm، ونفّذ short-term fine-tune، وقِس الدقة على مجموعة holdout. اختر المقترح الأعلى دقة. كرّر ما دامت الـ latency فوق الميزانية. نفّذ long-term fine-tune مرة واحدة في النهاية.

Recall

Why does NetAdapt use a measured per-layer lookup table instead of counting FLOPs or MACs?لماذا يستخدم NetAdapt جدول بحث مقيسًا لكل طبقة بدل عدّ الـ FLOPs أو الـ MACs؟

MACs are an indirect metric whose relation to latency is non-linear and platform dependent; the paper shows a network with 19% fewer MACs running 29% slower. Per-layer tables are cheap to build (layers of the same shape are measured once), sum to the network latency, and avoid timing every proposal on the device inside the loop, which is slow and hard to parallelize.
الـ MACs مقياس غير مباشر علاقته بالـ latency غير خطية وتعتمد على المنصة؛ وتُظهر الورقة شبكة فيها MACs أقل بنسبة 19% لكنها أبطأ بنسبة 29%. الجداول لكل طبقة رخيصة البناء (الطبقات ذات الشكل نفسه تُقاس مرة واحدة)، ومجموعها يعطي latency الشبكة، وتجنّبنا قياس كل مقترح على الجهاز داخل الحلقة، وهو أمر بطيء ويصعب تنفيذه بالتوازي.

Recall

What is the short-term fine-tune for, and which accuracy is reported for the final model?ما فائدة الـ short-term fine-tune، وأي دقة تُنشر للنموذج النهائي؟

It only makes candidates comparable: without it, accuracy collapses to near zero and the pick is noise. The reported accuracy comes after the long-term fine-tune, which adds 1.8 to 4.5 points in the paper.
وظيفته فقط جعل المرشحين قابلين للمقارنة: بدونه تنهار الدقة إلى ما يقارب الصفر ويصبح الاختيار ضجيجًا. أما الدقة المنشورة فتأتي بعد الـ long-term fine-tune، الذي يضيف من 1.8 إلى 4.5 نقطة في الورقة.

Quick checkاختبار سريع

In one NetAdapt iteration, what decides which layer's pruned proposal is carried to the next iteration?في تكرار واحد من NetAdapt، ما الذي يحدد أي مقترح (طبقة مقلَّمة) يُنقل إلى التكرار التالي؟

Quick checkاختبار سريع

Why does NetAdapt read a pre-measured lookup table instead of counting FLOPs?لماذا يقرأ NetAdapt جدول بحث مقيسًا مسبقًا بدل عدّ الـ FLOPs؟

Quick checkاختبار سريع

Which accuracy number describes the final NetAdapt model reported in the paper?أي رقم دقة يصف نموذج NetAdapt النهائي المنشور في الورقة؟

Look back at the worked example. The run was aiming for one network at 7.0 ms, but on the way it produced Net_1 at 9.0 ms and Net_2 at 7.6 ms, and neither took any extra work. Each was the best of its round and each already satisfied its own, slightly looser, constraint. Slide 40 is that observation at full scale: the number of models equals the number of iterations.

عُد إلى المثال المحلول. كان التشغيل يهدف إلى شبكة واحدة عند 7.0 ms، لكنه أنتج في الطريق Net_1 عند 9.0 ms وNet_2 عند 7.6 ms، ولم تتطلب أي منهما عملًا إضافيًا. كل منهما كانت الأفضل في جولتها وكانت تحقق بالفعل قيدها الخاص الأوسع قليلًا. الشريحة 40 هي هذه الملاحظة على نطاق كامل: عدد النماذج يساوي عدد التكرارات.

The paper states it directly. Besides the final network, NetAdapt can generate a sequence of simplified networks, the highest-accuracy network from each iteration Net_1 to Net_i, which together provide the efficient frontier of accuracy and resource consumption trade-offs. The authors call it a family of simplified networks that allows dynamic network selection. With the 0.5 ms initial step and 0.96 decay, the small MobileNetV1 run in Table 2 took 28 iterations, so it delivered 28 networks. The red dots on slide 40 are a series of the same kind plotted the same way, one dot per iteration winner, from about 3.5 ms to 11 ms.

تقول الورقة ذلك صراحة. إلى جانب الشبكة النهائية، يستطيع NetAdapt توليد سلسلة من الشبكات المبسَّطة، أي الشبكة الأعلى دقة من كل تكرار من Net_1 إلى Net_i، وهي معًا تشكّل المنحنى الكفء (efficient frontier) للمفاضلة بين الدقة واستهلاك المورد. ويسميها المؤلفون عائلة من الشبكات المبسَّطة تتيح اختيار الشبكة ديناميكيًا. مع خطوة ابتدائية قدرها 0.5 ms وتناقص بمعامل 0.96، استغرق تشغيل MobileNetV1 الصغيرة في Table 2 عدد 28 تكرارًا، فأعطى 28 شبكة. النقاط الحمراء في الشريحة 40 سلسلة من النوع نفسه مرسومة بالطريقة نفسها، نقطة لكل فائز في تكرار، من نحو 3.5 ms إلى 11 ms.

#models=#iterations\#\text{models} = \#\text{iterations}
Every iteration's winner is a deployable networkالفائز في كل تكرار شبكة قابلة للنشر
The NetAdapt curve is drawn point by point from about 43 percent at 3.5 ms to about 57 percent at 11 ms, while the width-multiplier triangles stay below and to the right of itيُرسم منحنى NetAdapt نقطة بنقطة من نحو 43 بالمئة عند 3.5 ms إلى نحو 57 بالمئة عند 11 ms، بينما تبقى مثلثات الـ width multiplier أسفله وإلى يمينه

Reading the chartقراءة الرسم

The horizontal axis is latency on a single large core of a Pixel 1 CPU, measured with TensorFlow Lite as the median of eleven runs. The vertical axis is ImageNet top-1 accuracy. The red dots are the NetAdapt model series for the small MobileNetV1; the green triangles are MobileNetV1 shrunk with the width and resolution multipliers, which is Uniform shrinking from part 02; the blue diamond is MorphNet. The two arrows pick a multiplier point and the MorphNet point and slide left along a horizontal line to the NetAdapt curve, which is where the speedups on the slide come from.

المحور الأفقي هو الـ latency على نواة كبيرة واحدة من معالج Pixel 1، مقيسة باستخدام TensorFlow Lite كوسيط (median) لإحدى عشرة مرة تشغيل. المحور الرأسي هو دقة top-1 على ImageNet. النقاط الحمراء هي model series الخاصة بـ NetAdapt لشبكة MobileNetV1 الصغيرة؛ والمثلثات الخضراء هي MobileNetV1 مصغَّرة بمضاعِفَي العرض والدقة المكانية (width and resolution multipliers)، وهذا هو uniform shrinking من الجزء 02؛ والمعيّن الأزرق هو MorphNet. يختار السهمان نقطة من الـ multiplier ونقطة MorphNet وينزلقان يسارًا على خط أفقي حتى منحنى NetAdapt، ومن هنا تأتي أرقام التسريع في الشريحة.

MethodالطريقةLatencyالـ LatencyTop-1Top-1
NetAdapt, smallest pointNetAdapt، أصغر نقطةabout 3.5 msنحو 3.5 msabout 43.0%نحو 43.0%
NetAdapt, matched to MorphNetNetAdapt، المقابلة لـ MorphNetabout 4.4 msنحو 4.4 msabout 46.3%نحو 46.3%
MorphNetMorphNetabout 7.0 ms (6.52 ms in Table 1)نحو 7.0 ms (6.52 ms في Table 1)46.0%46.0%
NetAdapt, matched to the multiplierNetAdapt، المقابلة للـ multiplierabout 7.3 msنحو 7.3 msabout 53.1%نحو 53.1%
Width multiplier baselineخط أساس الـ width multiplierabout 12.1 msنحو 12.1 msabout 52.7%نحو 52.7%
NetAdapt, largest pointNetAdapt، أكبر نقطةabout 11.1 msنحو 11.1 msabout 56.8%نحو 56.8%
Points behind the two arrows on slide 40 (values read from the chart are marked about)النقاط خلف السهمين في الشريحة 40 (القيم المقروءة من الرسم مسبوقة بكلمة نحو)

From about 12.1 ms to about 7.3 ms is 1.7x faster with 0.3% higher accuracy than the multiplier baseline. From about 7.0 ms to about 4.4 ms is 1.6x faster with 0.3% higher accuracy than MorphNet. Across the whole curve the paper summarises it as up to 1.7x faster with the same or higher accuracy. On a mobile GPU (Samsung Galaxy S8 through SNPE) the gain drops to about 1.2x, because about 6.2 ms of that pipeline's latency is overhead that no amount of pruning can remove.

الانتقال من نحو 12.1 ms إلى نحو 7.3 ms يعني تسريعًا بـ 1.7x مع دقة أعلى بـ 0.3% من خط أساس الـ multiplier. والانتقال من نحو 7.0 ms إلى نحو 4.4 ms يعني تسريعًا بـ 1.6x مع دقة أعلى بـ 0.3% من MorphNet. وعلى امتداد المنحنى كله تلخّص الورقة النتيجة بأنها أسرع حتى 1.7x بدقة مساوية أو أعلى. على معالج رسوميات محمول (Samsung Galaxy S8 عبر SNPE) ينخفض المكسب إلى نحو 1.2x، لأن نحو 6.2 ms من latency ذلك المسار كلفة ثابتة (overhead) لا يستطيع أي قدر من الـ pruning إزالتها.

Why does the frontier beat the multipliers at all? A width multiplier thins every layer by the same factor, so it cannot express that some layers matter more. NetAdapt's greedy picks build a non-uniform architecture: the paper's Fig. 10 shows it keeping more filters in layer 6, where the feature map resolution drops, and in the last convolution that feeds the 1000-class classifier, while cutting layers 7 to 10 harder. That is the same lesson as part 02, now discovered by measurement rather than by a sensitivity sweep.

لماذا يتفوق المنحنى على الـ multipliers أصلًا؟ الـ width multiplier يرقّق كل طبقة بالمعامل نفسه، فلا يستطيع التعبير عن أن بعض الطبقات أهم من غيرها. أما اختيارات NetAdapt الـ greedy فتبني بنية غير منتظمة (non-uniform): يُظهر Fig. 10 في الورقة أنها تُبقي filters أكثر في الطبقة 6، حيث تنخفض الدقة المكانية لخريطة الخصائص (feature map)، وفي آخر convolution تغذي المصنِّف ذا الـ 1000 فئة، بينما تقطع الطبقات من 7 إلى 10 بقوة أكبر. هذا هو درس الجزء 02 نفسه، لكنه مكتشف الآن بالقياس لا بمسح الحساسية (sensitivity sweep).

What the schedule does to the seriesماذا يفعل الـ schedule بالسلسلة

Because the series is a by-product of the loop, the step size shapes it. The paper compares three schedules for the same target latency.

بما أن السلسلة ناتج جانبي للحلقة، فإن حجم الخطوة يشكّلها. تقارن الورقة ثلاثة schedules للـ latency المستهدفة نفسها.

Initial ΔRΔR الابتدائيةDecayمعامل التناقصIterationsالتكراراتTop-1Top-1Latencyالـ Latency
0.5 ms0.5 ms0.960.96282847.7%47.7%4.63 ms4.63 ms
0.5 ms0.5 ms1.01.0202047.4%47.4%4.71 ms4.71 ms
0.8 ms0.8 ms0.950.95202046.7%46.7%4.65 ms4.65 ms
Table 2 of the NetAdapt paper: resource reduction schedules for the small MobileNetV1الجدول 2 في ورقة NetAdapt: جداول تقليص المورد لشبكة MobileNetV1 الصغيرة

Recall

Why does one NetAdapt run give a series of models, and how many?لماذا يعطي تشغيل واحد لـ NetAdapt سلسلة من النماذج، وكم عددها؟

Every iteration's winner already meets its own tighter constraint, so Net_1 to Net_i form a valid accuracy versus latency frontier. The number of models equals the number of iterations, 28 for the 0.5 ms, 0.96 schedule in the paper.
الفائز في كل تكرار يحقق بالفعل قيده الخاص الأضيق، لذلك تشكّل الشبكات من Net_1 إلى Net_i منحنى صالحًا للمفاضلة بين الدقة والـ latency. عدد النماذج يساوي عدد التكرارات، 28 للـ schedule ذي 0.5 ms و0.96 في الورقة.

Quick checkاختبار سريع

A NetAdapt run needs 28 iterations to reach its latency budget. How many trade-off models does it produce along the way?يحتاج تشغيل NetAdapt إلى 28 تكرارًا للوصول إلى ميزانية الـ latency. كم نموذجًا للمفاضلة ينتج في الطريق؟

Quick checkاختبار سريع

Compared with the width-multiplier baseline on slide 40, what does the NetAdapt model series achieve?مقارنة بخط أساس الـ width multiplier في الشريحة 40، ماذا تحقق سلسلة نماذج NetAdapt؟

Recapالخلاصة

If you remember nothing elseإن لم تتذكر شيئاً آخر فتذكّر هذا

  • NetAdapt solves maximize Acc(Net) subject to Res(Net) <= Bud by tightening the constraint by Delta R every iteration, a progressive barrier rather than one big cut.يحل NetAdapt مسألة تعظيم Acc(Net) بشرط Res(Net) <= Bud عن طريق تضييق القيد بمقدار Delta R في كل تكرار، أي حاجز تدريجي بدل قطع واحد كبير.
  • Each iteration thins exactly one layer: for every layer, read the filter count that meets Res minus Delta R from the lookup table, keep the largest-l2 filters, short-term fine-tune, measure holdout accuracy; keep the best proposal.كل تكرار يرقّق طبقة واحدة فقط: لكل طبقة، اقرأ من جدول البحث عدد الـ filters الذي يحقق Res ناقص Delta R، واحتفظ بالـ filters ذات أكبر l2، ثم نفّذ short-term fine-tune، وقِس الدقة على مجموعة holdout؛ ثم احتفظ بأفضل مقترح.
  • Latency comes from summed per-layer lookup tables measured on the target device. MACs are an indirect metric: the paper shows 19 percent fewer MACs running 29 percent slower.تأتي الـ latency من جمع جداول بحث لكل طبقة مقيسة على الجهاز المستهدف. الـ MACs مقياس غير مباشر: تُظهر الورقة شبكة فيها MACs أقل بنسبة 19 بالمئة لكنها أبطأ بنسبة 29 بالمئة.
  • The short-term fine-tune only ranks candidates; one long-term fine-tune at the end recovers 1.8 to 4.5 points and is the accuracy that gets reported.الـ short-term fine-tune يرتب المرشحين فقط؛ أما long-term fine-tune واحد في النهاية فيستعيد من 1.8 إلى 4.5 نقطة، وهو الدقة التي تُنشر في النتائج.
  • Delta R is a schedule: 0.5 ms decaying by 0.96 per iteration gave 28 iterations and 47.7 percent for the small MobileNetV1; larger steps finish sooner at a cost in accuracy, and for the same iteration count a smaller initial step with slower decay is preferable.Delta R جدول زمني (schedule): البدء بـ 0.5 ms مع تناقص بمعامل 0.96 في كل تكرار أعطى 28 تكرارًا ودقة 47.7 بالمئة لشبكة MobileNetV1 الصغيرة؛ الخطوات الأكبر تنتهي أسرع لكن على حساب الدقة، ولنفس عدد التكرارات يُفضَّل خطوة ابتدائية أصغر مع تناقص أبطأ.
  • Number of models equals number of iterations, so one run traces the accuracy versus latency frontier: 1.7x faster than width multipliers and 1.6x faster than MorphNet at equal or 0.3 percent higher accuracy on a Pixel 1 CPU.عدد النماذج يساوي عدد التكرارات، لذلك يرسم تشغيل واحد منحنى المفاضلة بين الدقة والـ latency: أسرع بـ 1.7x من الـ width multipliers وأسرع بـ 1.6x من MorphNet بدقة مساوية أو أعلى بـ 0.3 بالمئة على معالج Pixel 1.
  • Versus AMC: a greedy rule instead of an RL agent, one layer per iteration, a measured lookup table, and a model at every iteration.مقارنة بـ AMC: قاعدة greedy بدل وكيل RL، وطبقة واحدة في كل تكرار، وجدول بحث مقيس، ونموذج عند كل تكرار.

Sourcesالمصادر