Lecture 04-2 · Pruning and Sparsity II

المحاضرة 04-2 · التقليم والتناثر (Pruning and Sparsity II)

AMC: RL-based automatic pruning

AMC: تقليم تلقائي مبني على التعلم المعزز (RL)

Slides 24–32 الشرائح 24–32 P2 SHOULD

An overall compression target fixes only the total. Splitting it across layers is a search whose objective, accuracy, can only be seen by trying a configuration. AMC hands that search to a reinforcement learning agent that picks one ratio per layer.

هدف الضغط الكلي يحدد المجموع فقط. أما توزيعه على الطبقات فهو بحث لا يمكن رؤية هدفه، أي الدقة، إلا بتجربة التوزيع فعلاً. يسلّم AMC هذا البحث إلى وكيل reinforcement learning يختار نسبة واحدة لكل طبقة.

What gets asked ما الذي يُسأل عنه

Formulate pruning as RL: name the state, action, agent and reward, and justify each. Explain why the action is continuous and why the reward is minus error under a constraint. Read the ResNet-50 density bars (5x versus 3.4x) and the MobileNet phone table (FLOPs target versus time target).

صِغ pruning كمسألة RL: اذكر state وaction وagent وreward وبرّر كل واحد. اشرح لماذا action مستمر، ولماذا reward هو سالب الخطأ تحت قيد. واقرأ أعمدة الكثافة لـ ResNet-50 (5x مقابل 3.4x) وجدول الهاتف لـ MobileNet (هدف FLOPs مقابل هدف الزمن).

Why per-layer ratios need a search, slides 24 to 26

لماذا تحتاج النِّسَب لكل طبقة إلى بحث، الشرائح 24 إلى 26

Slide 24 asks: given an overall compression ratio, how do we choose the per-layer ratios? Sensitivity analysis (the previous two pages) prunes one layer at a time and reads each ratio off its own curve. It silently assumes the accuracy losses of different layers add up. They do not: pruning layer 3 changes what layer 4 receives, so the curve measured for layer 4 on the dense network is the wrong curve once layer 3 is thin. The slide's verdict is "ignores the interaction between layers, so sub-optimal".

تسأل الشريحة 24: إذا أُعطيت نسبة ضغط كلية، كيف نختار النسب لكل طبقة؟ تحليل الحساسية (sensitivity analysis) في الصفحتين السابقتين يقلّم طبقة واحدة في كل مرة ويقرأ نسبتها من منحناها الخاص. وهو يفترض ضمنياً أن خسائر الدقة في الطبقات المختلفة تُجمع جمعاً. وهذا غير صحيح: تقليم الطبقة 3 يغيّر ما تستقبله الطبقة 4، فالمنحنى المقاس للطبقة 4 على الشبكة الكثيفة يصبح المنحنى الخطأ بعد أن تَرِقّ الطبقة 3. حكم الشريحة: "يتجاهل التفاعل بين الطبقات، فهو sub-optimal".

The search space is huge. Fifty prunable layers with ten candidate ratios each is 1050 configurations. Slide 25 adds the practical cost: conventionally a human expert allocates the ratios by trial and error, which does not scale to many customers, many models and many devices, and the hand rules do not transfer between models. Slide 26 states the goal: a push-the-button solution where a non-expert plus a hardware-centric AutoML tool reaches the same efficient network as a machine learning and hardware expert.

فضاء البحث هائل: خمسون طبقة قابلة للتقليم مع عشر نسب مرشحة لكل منها تعطي 1050 توزيعاً. وتضيف الشريحة 25 الكلفة العملية: تقليدياً يوزع خبير بشري النسب بالتجربة والخطأ، وهذا لا يتوسع مع كثرة العملاء والنماذج والأجهزة، والقواعد اليدوية لا تنتقل من نموذج إلى آخر. وتذكر الشريحة 26 الهدف: حل "بضغطة زر" يصل فيه شخص غير خبير مع أداة hardware-centric AutoML إلى نفس الشبكة الكفؤة التي يصل إليها خبير في machine learning والعتاد معاً.

Pruning as reinforcement learning, slides 27 to 29

التقليم كمسألة تعلم معزز (reinforcement learning)، الشرائح 27 إلى 29

AMC (He et al., ECCV 2018) walks the pretrained network layer by layer. At layer t the agent reads a description of that layer, outputs one number, the sparsity ratio for that layer, and the environment prunes the layer by magnitude. After the last layer the whole pruned network is evaluated once on a held-out set, without fine-tuning, and that single number comes back as the reward. One pass over all layers is one episode.

يمر AMC (He et al., ECCV 2018) على الشبكة المدرّبة مسبقاً طبقة طبقة. عند الطبقة t يقرأ الوكيل وصفاً لتلك الطبقة، ويُخرج رقماً واحداً هو نسبة sparsity لهذه الطبقة، ثم تقلّم البيئة الطبقة حسب magnitude. وبعد آخر طبقة تُقيَّم الشبكة المقلّمة كلها مرة واحدة على مجموعة held-out بدون fine-tuning، ويعود هذا الرقم الواحد على شكل reward. والمرور الواحد على كل الطبقات يسمى episode.

AGENT · DDPG ENVIRONMENT · LAYER-WISE PRUNING Critic scores Q(s, a) Actor proposes at Embedding st 11 features of layer t action at = 0.5 continuous ratio layer t+1 · next kept pruned layer t-1 · 30% after the last layer reward R = -Error (one per episode) state read from the layer
One step of the loop. The embedding of layer t feeds the actor and the critic; the actor emits a ratio; the environment hollows out that fraction of layer t by magnitude and moves to layer t+1; only after the last layer does a reward come back.
خطوة واحدة من الحلقة. تمثيل (embedding) الطبقة t يُغذّي actor وcritic، ويُخرج actor نسبة، وتُفرغ البيئة هذا الجزء من الطبقة t حسب magnitude وتنتقل إلى الطبقة t+1، ولا تعود المكافأة إلا بعد آخر طبقة.

يرسم الشكل خطوة واحدة من الحلقة: embedding الطبقة t يغذي actor وcritic، ويُخرج actor نسبة، فتفرّغ البيئة هذا الجزء من الطبقة t حسب magnitude وتنتقل إلى الطبقة t+1، ولا يعود reward إلا بعد آخر طبقة.

IngredientالمكوّنAMC choiceاختيار AMCWhyالسبب
State stالحالة stLayer embedding: 11 features (t, n, c, h, w, stride, k, FLOPs[t], reduced, rest, at-1), each scaled to [0, 1]. The slide abbreviates it [N, C, H, W, i, ...].تمثيل الطبقة (layer embedding): 11 خاصية (t, n, c, h, w, stride, k, FLOPs[t], reduced, rest, at-1)، كل منها مُحجَّمة إلى [0, 1]. وتختصرها الشريحة إلى [N, C, H, W, i, ...].Tells the agent which layer it is on, its shape and cost, and how much budget is spent and left.تخبر الوكيل (agent) بالطبقة التي هو عليها، وشكلها وكلفتها، وكم صُرف من الميزانية وكم بقي.
Action atالفعل atOne continuous number, the sparsity ratio of layer tرقم مستمر واحد، هو نسبة التناثر للطبقة tAccuracy is sensitive to the exact ratio; a grid loses order and explodes the action count.الدقة حساسة للنسبة الدقيقة، والشبكة المتقطعة (grid) تفقد الترتيب وتُضخّم عدد الأفعال.
Agentالوكيل (Agent)DDPG (Deep Deterministic Policy Gradient), actor-criticDDPG (Deep Deterministic Policy Gradient)، من نوع actor-criticBuilt for continuous actions: the actor proposes a, the critic estimates Q(s, a).مصمم للأفعال المستمرة: actor يقترح a، وcritic يقدّر Q(s, a).
Environmentالبيئة (Environment)Channel pruning of the pretrained net, one layer per step, magnitude selection inside the layerتقليم قنوات الشبكة المدرَّبة مسبقاً، طبقة واحدة في كل خطوة، مع اختيار حسب magnitude داخل الطبقةAMC learns how many, never which.AMC يتعلم كم يُحذف، ولا يتعلم أبداً ماذا يُحذف.
Rewardالمكافأة (Reward)R = -Error if the FLOPs or latency constraint holds, -∞ otherwiseR = -Error إذا تحقق قيد FLOPs أو زمن الاستجابة، و-∞ خلاف ذلكRL maximizes reward, so maximizing -Error minimizes error.RL يعظّم المكافأة، فتعظيم -Error يقلل الخطأ.

يلخّص الجدول المكونات الخمسة: state هو layer embedding من 11 سمة مقيّسة إلى [0, 1]، وaction رقم مستمر واحد هو نسبة sparsity، وagent هو DDPG من نوع actor-critic، والبيئة هي channel pruning طبقة طبقة مع اختيار حسب magnitude داخل الطبقة، وreward يساوي -Error إذا تحقق القيد و-∞ إذا لم يتحقق.

R = -Error   if FLOPs or latency ≤ budget,    R = -∞   otherwise     (slide 29)

الصيغة: R = -Error إذا كانت FLOPs أو latency ضمن الميزانية، وR = -∞ في غير ذلك (الشريحة 29).

Why a constraint and not a bonus for shrinking? If the agent were paid for being smaller, it would keep shrinking past the target and spend accuracy for nothing. With a hard constraint there is no reward for finishing under budget, so the agent lands on the target. The paper also clamps each action from below (the "duty" each remaining layer must carry) so that the budget is met by construction; -∞ is the formal backstop. Slide 29 adds that the resource can be latency instead of FLOPs, read from a pre-built per-layer lookup table measured on the phone.

لماذا قيد وليس مكافأة على التصغير؟ لو كوفئ الوكيل على الصِغَر لاستمر في التصغير بعد الهدف وأنفق الدقة بلا فائدة. ومع قيد صارم لا توجد مكافأة على الانتهاء تحت الميزانية، فيصل الوكيل إلى الهدف بالضبط. كما أن الورقة تضع حداً أدنى لكل action (الحصة التي يجب أن تتحملها كل طبقة متبقية) فتتحقق الميزانية بالبناء، و-∞ مجرد ضمان شكلي. وتضيف الشريحة 29 أن المورد يمكن أن يكون latency بدلاً من FLOPs، تُقرأ من lookup table (LUT) مبني مسبقاً لكل طبقة ومقاس على الهاتف.

Slide 28 shows a second protocol for "smallest model with no accuracy loss", where the budget is unknown in advance. There the reward is R = -Error · log(FLOP): the bubble chart (Canziani et al.) shows accuracy grows roughly with log of operations, so this gives a small incentive to cut FLOPs while staying sensitive to error. The ResNet-50 and MobileNet results below use the constrained reward.

تعرض الشريحة 28 بروتوكولاً ثانياً لهدف "أصغر نموذج بلا خسارة في الدقة"، حيث الميزانية غير معروفة مسبقاً. هناك يكون R = -Error · log(FLOP): فالرسم الفقاعي (Canziani et al.) يُظهر أن الدقة تنمو تقريباً مع لوغاريتم عدد العمليات، فيعطي هذا حافزاً صغيراً لخفض FLOPs مع البقاء حساساً للخطأ. أما نتائج ResNet-50 وMobileNet أدناه فتستخدم reward المقيّد.

Why continuous actions and why DDPG

لماذا أفعال مستمرة ولماذا DDPG

A pruning ratio is a real number and accuracy reacts strongly to it. A discrete agent would need a grid fine enough to separate 48 percent from 52 percent, which explodes the number of actions, and a grid throws away the fact that neighboring ratios behave alike. DDPG is the standard actor-critic method for continuous control: the critic learns Q(s, a), how much reward a state and ratio pair leads to; the actor is nudged by gradient ascent on that estimate to propose ratios the critic scores higher. The critic is also what spreads the single end-of-episode reward back over the individual layer decisions.

نسبة التقليم عدد حقيقي، والدقة تتأثر بها بشدة. وكيل بأفعال منفصلة سيحتاج إلى شبكة نقاط دقيقة بما يكفي للتمييز بين 48% و52%، فينفجر عدد الأفعال، كما أن الشبكة المنفصلة تُضيع حقيقة أن النسب المتجاورة تتصرف بشكل متشابه. وDDPG هو الطريقة القياسية من نوع actor-critic للتحكم المستمر: critic يتعلم Q(s, a)، أي مقدار reward الذي يقود إليه زوج الحالة والنسبة، وactor يُدفع بـ gradient ascent على هذا التقدير ليقترح نسباً يعطيها critic درجة أعلى. وcritic هو أيضاً من يوزع reward الوحيد في نهاية episode على قرارات الطبقات الفردية.

What AMC does not change: inside each layer, which channels or weights go is still decided by magnitude, and the best network found by the search is fine-tuned once at the end. The search itself evaluates hundreds of pruned networks with no training, which is what makes it affordable.

ما لا يغيّره AMC: داخل كل طبقة يبقى اختيار القنوات أو الأوزان المحذوفة حسب magnitude، وأفضل شبكة يجدها البحث يُجرى لها fine-tuning مرة واحدة في النهاية. والبحث نفسه يقيّم مئات الشبكات المقلّمة بلا أي تدريب، وهذا ما يجعله ممكن الكلفة.

Worked مثال محلول

A toy five-layer network with 300 M FLOPs and a 50 percent FLOPs budget (keep at most 150 M). Three candidate episodes:

شبكة تجريبية من خمس طبقات بـ 300 M FLOPs وميزانية 50% من FLOPs (أبقِ 150 M على الأكثر). ثلاث episodes مرشحة:

policy                          kept FLOPs   error     reward
uniform   [.5 .5 .5 .5 .5]      150 M        41.25 %   -41.25
agent     [.1 .5 .7 .6 .2]      142 M        35.86 %   -35.86   best
timid     [.1 .2 .3 .3 .1]      228 M        n/a       -inf     (228 > 150)

the agent policy wins: it spares the sensitive first and last layers
and prunes the redundant middle hard. -35.86 > -41.25

Note the reward does not care that the agent policy is 8 M under budget. Being smaller is not paid; being accurate inside the budget is.

لاحظ أن reward لا يهتم بأن سياسة الوكيل أقل من الميزانية بـ 8 M. الصِغَر وحده لا يُكافأ، بل تُكافأ الدقة داخل الميزانية.

ResNet-50: agent versus expert, slides 30 and 31

ResNet-50: الوكيل مقابل الخبير، الشريحتان 30 و31

Slide 30 compares AMC with Song Han's hand-pruned ResNet-50 (fine-grained weight pruning). The expert kept 29 percent of the weights; AMC kept 20 percent, at the same top-1 accuracy (76.13 percent original, 76.11 percent AMC). The y-axis is density, non-zero weights over total, so lower is better.

تقارن الشريحة 30 بين AMC وResNet-50 الذي قلّمه Song Han يدوياً (fine-grained weight pruning). احتفظ الخبير بـ 29% من الأوزان، واحتفظ AMC بـ 20%، بنفس دقة top-1 (76.13% للأصل و76.11% لـ AMC). المحور الرأسي هو density، أي الأوزان غير الصفرية على الكلية، فالأقل أفضل.

RegionالمنطقةHuman expertالخبير البشريAMCAMC
Conv150%43%
ResBlock131%28%
ResBlock231%28%
ResBlock330%23%
ResBlock430%19%
FC20%10%
Totalالمجموع29% (3.4x)20% (5x)

يبيّن الجدول كثافة كل منطقة: الخبير 29% إجمالاً أي 3.4x، وAMC 20% أي 5x. أكبر المكاسب في الكتل المتأخرة (ResBlock4 من 30% إلى 19%) وفي FC (من 20% إلى 10%)، بينما بقيت Conv1 الأكثف لأن الطبقة الأولى حساسة.

Slide 31 plots density along the layer index and shows a sawtooth. The peaks (kept denser) are the 1x1 convolutions; the crests (cut deeper) are the 3x3 convolutions. The agent learned on its own that 3x3 layers have more redundancy: nine spatial taps per channel pair, and most of a bottleneck's weights. Nobody told it about kernel shapes; k is just one of the eleven state features. The curves stage1 to stage4 are four pruning iterations (50, 35, 25, 20 percent density), not four network stages.

ترسم الشريحة 31 الكثافة على امتداد رقم الطبقة فتظهر أسنان منشار. القمم (الأكثر كثافة) هي 1x1 convolutions، والقيعان (المقلّمة أكثر) هي 3x3 convolutions. تعلّم الوكيل وحده أن طبقات 3x3 فيها تكرار أكثر: تسع نقاط مكانية لكل زوج قنوات، ومعظم أوزان كتلة bottleneck. لم يخبره أحد بأشكال النوى، فـ k مجرد واحدة من السمات الإحدى عشرة. والمنحنيات stage1 إلى stage4 هي أربع جولات تقليم (كثافة 50% و35% و25% و20%)، وليست أربع مراحل من الشبكة.

MobileNet on a phone: FLOPs target versus time target, slide 32

MobileNet على الهاتف: هدف FLOPs مقابل هدف الزمن، الشريحة 32

Measured with TF-Lite on a Samsung Galaxy S7 Edge (Snapdragon SoC), single core, batch size 1. The 0.75 MobileNet baseline is the same network with every layer's width scaled by 75 percent, the uniform alternative.

القياس بـ TF-Lite على Samsung Galaxy S7 Edge (معالج Snapdragon)، نواة واحدة، batch size 1. وخط الأساس 0.75 MobileNet هو نفس الشبكة بعد تقليص عرض كل طبقة إلى 75%، أي البديل المنتظم.

ModelالنموذجMACsMACsTop-1Top-1Latencyزمن الاستجابة (Latency)SpeedupالتسريعMemoryالذاكرة
1.0 MobileNet569M70.6%119.0 ms1x20.1 MB
AMC (50% FLOPs)AMC (50% FLOPs)285M70.5%64.4 ms1.8x14.3 MB
AMC (50% Time)AMC (50% من الزمن)272M70.2%59.7 ms2.0x13.2 MB
0.75 MobileNet325M68.4%69.5 ms1.7x14.8 MB

يقارن الجدول أربعة نماذج: 1.0 MobileNet الكامل، وAMC بهدف 50% FLOPs (64.4 ms و70.5%)، وAMC بهدف 50% Time (59.7 ms و70.2%)، و0.75 MobileNet المنتظم (69.5 ms و68.4%). كلا نموذجي AMC أسرع وأدق وأصغر من البديل المنتظم.

Worked مثال محلول
speedups    119.0 / 64.4 = 1.85x   (slide rounds to 1.8x)
            119.0 / 59.7 = 1.99x   (2.0x)
            119.0 / 69.5 = 1.71x   (1.7x)

MAC ratio   285 / 569 = 0.50     the FLOPs target was hit exactly
            272 / 569 = 0.48
            325 / 569 = 0.57     about 0.75^2 = 0.5625, width scales cost by alpha^2

accuracy    -0.1, -0.4, -2.2 points versus 70.6 %

ResNet-50   1 / 0.29 = 3.4x expert,   1 / 0.20 = 5.0x AMC

Halving FLOPs bought 1.85x, not 2x. Only the time target, which constrains the measured quantity directly, reached about 2x. FLOPs are a proxy for latency, not latency.

تنصيف FLOPs أعطى 1.85x لا 2x. وحده هدف الزمن، الذي يقيّد الكمية المقاسة مباشرة، وصل إلى نحو 2x. فـ FLOPs مجرد بديل تقريبي عن latency، وليست latency نفسها.

Exam trap فخ امتحاني

"Why continuous?" is not answered by "because DDPG needs it". The causation runs the other way: the ratio is a real number to which accuracy is sensitive, and a grid loses ordering and explodes the action count, so a continuous-action agent (DDPG) was chosen.

"لماذا مستمر؟" لا يُجاب عنه بـ "لأن DDPG يحتاجه". السببية معكوسة: النسبة عدد حقيقي والدقة حساسة له، والتقسيم إلى شبكة نقاط يُضيع الترتيب ويفجّر عدد الأفعال، ولذلك اختير وكيل بأفعال مستمرة (DDPG).

FLOPs is only a proxy for latency. The 50 percent FLOPs model is slower (64.4 ms) than the 50 percent time model (59.7 ms) even though both halve the work. If a question says "meet a latency target", the reward should constrain measured latency (lookup table), not FLOPs.

FLOPs مجرد بديل تقريبي عن latency. نموذج 50% FLOPs أبطأ (64.4 ms) من نموذج 50% Time (59.7 ms) رغم أن كليهما ينصّف العمل. إذا قال السؤال "حقق هدف latency" فيجب أن يقيّد reward زمن الاستجابة المقاس (lookup table) لا FLOPs.

The y-axis is density, not sparsity. A peak in slide 31 is a layer pruned less. And AMC learns only the ratios; it does not learn which weights to drop and it does not train from scratch.

المحور الرأسي هو density لا sparsity. القمة في الشريحة 31 طبقة قُلّمت أقل. وAMC يتعلم النسب فقط، فلا يتعلم أي الأوزان تُحذف، ولا يدرّب من الصفر.

Memory hook خطّاف للذاكرة

"Embed, act, prune, repeat, then score." State is the layer's 11-number ID card, action is one real ratio, DDPG decides, and the only feedback is minus error once the whole net is pruned. Peaks are 1x1, crests are 3x3.

"صِف، تصرّف، قلّم، كرّر، ثم قيّم." state هو بطاقة هوية الطبقة من 11 رقماً، وaction نسبة حقيقية واحدة، وDDPG يقرر، والتغذية الراجعة الوحيدة هي سالب الخطأ بعد تقليم الشبكة كلها. القمم 1x1، والقيعان 3x3.

Check yourself

اختبر نفسك

Why does AMC use a continuous action instead of choosing from a discrete set of ratios?

لماذا يستخدم AMC action مستمراً بدلاً من الاختيار من مجموعة منفصلة من النسب؟

C. The ratio is a real number; a grid fine enough to matter is huge and treats neighboring ratios as unrelated. DDPG was picked because it handles continuous actions. A is true of AMC but is why a critic is useful, not why actions are continuous. D is false: DDPG has a critic.

الجواب C. النسبة عدد حقيقي، وشبكة نقاط دقيقة بما يكفي تكون ضخمة وتعامل النسب المتجاورة كأنها غير مترابطة. واختير DDPG لأنه يتعامل مع الأفعال المستمرة. الخيار A صحيح عن AMC لكنه سبب فائدة critic لا سبب استمرارية الأفعال. والخيار D خاطئ: DDPG فيه critic.

Under a FLOPs budget, the agent's pruned network breaks the budget. What reward does slide 29 assign?

تحت ميزانية FLOPs، تجاوزت الشبكة المقلّمة الميزانية. ما reward الذي تعطيه الشريحة 29؟

B. The constrained reward is -Error only when the constraint holds, and minus infinity otherwise. C is the slide 28 reward for the accuracy-guaranteed protocol where no budget is set. D would make an infeasible network look better than any feasible one with nonzero error.

الجواب B. reward المقيّد يساوي -Error فقط عند تحقق القيد، و-∞ في غير ذلك. الخيار C هو reward الشريحة 28 لبروتوكول ضمان الدقة حيث لا توجد ميزانية. والخيار D سيجعل الشبكة المخالفة تبدو أفضل من أي شبكة صالحة لها خطأ غير صفري.

In the ResNet-50 policy plot, which layers did the agent keep densest inside each residual block?

في رسم سياسة ResNet-50، أي الطبقات أبقاها الوكيل الأكثر كثافة داخل كل residual block؟

D. Peaks of density are 1x1 layers; crests are 3x3 layers, which have more redundancy and are pruned harder. The FC layer fell to 10 percent density, the sparsest region. A is the classic flip of peaks and crests.

الجواب D. قمم الكثافة هي طبقات 1x1، والقيعان هي طبقات 3x3 التي فيها تكرار أكثر فتُقلّم أكثر. أما FC فنزلت إلى كثافة 10%، وهي أقل المناطق كثافة. والخيار A هو الخلط الكلاسيكي بين القمم والقيعان.

What exactly does the AMC agent learn?

ماذا يتعلم وكيل AMC بالضبط؟

A. AMC learns how many, never which. Magnitude selection inside each layer and one final fine-tune of the best network are unchanged. B and C describe things AMC does not touch; D is NAS, not pruning.

الجواب A. يتعلم AMC "كم" لا "أيّ". اختيار magnitude داخل كل طبقة وfine-tuning نهائي واحد لأفضل شبكة يبقيان كما هما. الخياران B وC يصفان أشياء لا يمسها AMC، وD هو NAS لا pruning.

AMC with a 50% FLOPs target gives 64.4 ms versus 119.0 ms for the full MobileNet. What does this show?

يعطي AMC بهدف 50% FLOPs زمن 64.4 ms مقابل 119.0 ms لـ MobileNet الكامل. ماذا يُظهر ذلك؟

C. 119.0 / 64.4 = 1.85. The MAC count was halved exactly (285M / 569M = 0.50), so B is wrong; the gap is between FLOPs and real time. The 50% time model reaches 1.99x. D is false: 0.75 MobileNet takes 69.5 ms.

الجواب C. 119.0 / 64.4 = 1.85. عدد MACs نُصّف بالضبط (285M / 569M = 0.50)، فالخيار B خاطئ، والفجوة بين FLOPs والزمن الحقيقي. نموذج 50% Time يصل إلى 1.99x. والخيار D خاطئ: 0.75 MobileNet يستغرق 69.5 ms.