Majid Al-RaimiReference sheetالورقة المرجعية

COE 592Lecture 5.2المحاضرة 5.2Referenceالمرجع

Reference sheetالورقة المرجعية

Quantization (II): Linear Quantization and Integer-Only Inference compressed onto one page: the definitions, formulas and numbers to have in your head before a quiz or exam.محاضرة «التكميم (Quantization) الجزء الثاني: التكميم الخطي والاستدلال بالأعداد الصحيحة فقط» مضغوطة في صفحة واحدة: التعريفات والمعادلات والأرقام التي يجب أن تكون حاضرة في ذهنك قبل الاختبار القصير أو الامتحان.

Storage versus computationالتخزين مقابل الحساب

Linear quantization stores integers and also computes with them; K-means only stores them. Bits for the 16 example weights in the last column. Part 01: Linear quantization, Part 05: Integer-only layers

التكميم الخطي يخزّن أعدادًا صحيحة ويحسب بها أيضًا، أما K-means فيخزّنها فقط. العمود الأخير يعطي عدد البتات لأوزان المثال الـ 16. الجزء 01: التكميم الخطي، الجزء 05: طبقات بالأعداد الصحيحة فقط

SchemeالمخططStorageالتخزينComputationالحساب4×4 exampleمثال 4×4
FP32FP32Floating-point weightsأوزان بالفاصلة العائمةFloating-point arithmeticحساب بالفاصلة العائمة512 bits512 bits
K-means, 4 clustersK-means، 4 عناقيدInteger indices plus a float codebookفهارس صحيحة مع codebook بالفاصلة العائمةFloating-point arithmeticحساب بالفاصلة العائمة32 + 128 = 160 bits32 + 128 = 160 bits
Linear, 2 bitsخطي، 2 بتInteger weights plus one S and one Zأوزان صحيحة مع S واحد وZ واحدInteger arithmeticحساب بالأعداد الصحيحة32 + 32 + 2 = 66 bits32 + 32 + 2 = 66 bits
Binary/TernaryBinary/Ternary (ثنائي/ثلاثي)Later lectureمحاضرة لاحقةLater lectureمحاضرة لاحقةNot coveredغير مغطى
Slides 2 and 25الشريحتان 2 و25
∑krW,k rX,k=SWSX∑k(qW,k−ZW)(qX,k−ZX)\sum_k r_{W,k}\, r_{X,k} = S_W S_X \sum_k (q_{W,k} - Z_W)(q_{X,k} - Z_X)
One scale per tensor factors out of the dot product, leaving integer MACsمقياس واحد لكل موتر يخرج من الضرب النقطي، فتبقى عمليات MAC صحيحة

The affine mapالتحويل الأفيني

Quantize forward with round and clamp; reconstruct backward with the affine map. Real 0 is code Z exactly. Part 01: Linear quantization, Part 02: Scale and zero point

التكميم في الاتجاه الأمامي يكون بالتقريب ثم القصّ (round and clamp)، وإعادة البناء في الاتجاه العكسي تكون بالتحويل الأفيني. القيمة الحقيقية 0 تساوي الرمز Z تمامًا. الجزء 01: التكميم الخطي، الجزء 02: المقياس ونقطة الصفر

r=S (q−Z)r = S\,(q - Z)
Backward: code to real valueعكسيًا: من الرمز إلى القيمة الحقيقية
q=clamp⁡ ⁣(round⁡ ⁣(rS)+Z,  qmin⁡,  qmax⁡)q = \operatorname{clamp}\!\left(\operatorname{round}\!\left(\tfrac{r}{S}\right) + Z,\; q_{\min},\; q_{\max}\right)
Forward: real value to stored codeأماميًا: من القيمة الحقيقية إلى الرمز المخزن
∣e∣≤S2for S(qmin⁡−Z)−S2≤r≤S(qmax⁡−Z)+S2|e| \le \tfrac{S}{2} \quad \text{for } S(q_{\min} - Z) - \tfrac{S}{2} \le r \le S(q_{\max} - Z) + \tfrac{S}{2}
Rounding error bound; beyond it the clamp adds clipping errorحد خطأ التقريب؛ وما بعده يضيف القصّ خطأ القطع (clipping error)
SymbolالرمزMeaningالمعنىTypeالنوعHow manyالعدد
rrReal valueقيمة حقيقيةFloatعدد عائم (float)Per valueلكل قيمة
qqStored codeالرمز المخزَّنN-bit signed integerعدد صحيح بإشارة بطول N بتPer valueلكل قيمة
ZZZero point, the code for real 0نقطة الصفر، أي رمز القيمة الحقيقية 0Integer, same type as qعدد صحيح من نوع q نفسهOne per tensorواحد لكل tensor
SSScale, real step between codesالمقياس، أي الخطوة الحقيقية بين رمزين متتاليينFloatعدد عائم (float)One per tensorواحد لكل tensor
Types of the four symbolsأنواع الرموز الأربعة

Deriving S and Zاشتقاق S وZ

Pin both range ends, subtract to cancel Z, solve for S, then back-substitute and round. Part 02: Scale and zero point

ثبّت طرفي المدى، واطرح المعادلتين لتلغي Z، وحُلّ لإيجاد S، ثم عوّض عكسيًا وقرّب. الجزء 02: المقياس ونقطة الصفر

qmin⁡=−2N−1,qmax⁡=2N−1−1q_{\min} = -2^{N-1}, \qquad q_{\max} = 2^{N-1} - 1
Signed N-bit rangeالمدى ذو الإشارة بعدد N من البتات
NNCodesعدد الرموزq_minq_minq_maxq_maxGaps q_max - q_minالفجوات q_max - q_min
2244-2-21133
3388-4-43377
441616-8-8771515
88256256-128-128127127255255
Signed code rangesمديات الرموز ذات الإشارة
S=rmax⁡−rmin⁡qmax⁡−qmin⁡,Z=round⁡ ⁣(qmin⁡−rmin⁡S)S = \dfrac{r_{\max} - r_{\min}}{q_{\max} - q_{\min}}, \qquad Z = \operatorname{round}\!\left(q_{\min} - \dfrac{r_{\min}}{S}\right)
Scale first (Z cancels), then the zero point, rounded to an integerالمقياس أولًا (تُحذف Z)، ثم نقطة الصفر مقرّبةً إلى عدد صحيح

Running example, 2 bits (slides 3 to 10)المثال الجاري، 2 بت (الشرائح من 3 إلى 10)

Rangeالمدى
r_min = -1.08, r_max = 2.12, width 3.20r_min = -1.08، r_max = 2.12، والعرض 3.20
Scaleالمقياس
3.20 / 3 = 1.0667, written 1.07 on the slides3.20 / 3 = 1.0667، ومكتوب 1.07 في الشرائح
Zero pointنقطة الصفر
round(-2 + 1.08 / 1.07) = round(-0.991) = -1, binary 11round(-2 + 1.08 / 1.07) = round(-0.991) = -1، وبالثنائي 11
Codesالرموز
[[1, -2, 0, -1], [-1, -1, -2, 1], [-2, 1, -1, -2], [1, -1, 0, 0]][[1, -2, 0, -1], [-1, -1, -2, 1], [-2, 1, -1, -2], [1, -1, 0, 0]]
Levelsالمستويات
01 → 2.14, 00 → 1.07, 11 → 0, 10 → -1.0701 → 2.14, 00 → 1.07, 11 → 0, 10 → -1.07
Error boundحد الخطأ
|e| ≤ S/2 = 0.535. Worst cell 1.53 → 1.07, error 0.46|e| ≤ S/2 = 0.535. أسوأ خلية 1.53 → 1.07، وخطؤها 0.46
Why top level is 2.14لماذا المستوى الأعلى 2.14
S rounded up to 1.07 and Z rounded to an integer; unrounded S and Z give exactly 2.12قُرّب S إلى الأعلى ليصبح 1.07، وقُرّبت Z إلى عدد صحيح؛ ولو لم نقرّب S وZ لحصلنا على 2.12 تمامًا

Drillsتمارين

ReLU6 [0, 6], 8-bit
S = 6 / 255 = 0.02353, Z = -128, real 6 is code 127S = 6 / 255 = 0.02353، Z = -128، والقيمة الحقيقية 6 رمزها 127
[-1, 3], 4-bit, r = 1.0
S = 4 / 15 = 0.2667, Z = round(-4.25) = -4, q = 4 - 4 = 0, back to 1.067S = 4 / 15 = 0.2667، Z = round(-4.25) = -4، q = 4 - 4 = 0، وتعود إلى 1.067
[-0.5, 1.5], 2-bit
S = 0.6667, Z = round(-1.25) = -1S = 0.6667, Z = round(-1.25) = -1

Quantized matrix multiplicationضرب المصفوفات المكمّمة

Substitute S(q - Z) for Y, W and X, divide by S_Y, add Z_Y. Part 03: Quantized matrix multiplication

عوّض S(q - Z) مكان Y وW وX، ثم اقسم على S_Y، وأضف Z_Y. الجزء 03: ضرب المصفوفات المكمّمة

qY=SWSXSY (qW−ZW)(qX−ZX)+ZYq_Y = \frac{S_W S_X}{S_Y}\,(q_W - Z_W)(q_X - Z_X) + Z_Y
Factored formالصيغة المحلَّلة إلى عوامل
qY,ij=M(∑kqW,ik qX,kj−ZW∑kqX,kj−ZX∑kqW,ik+K ZWZX)+ZY,M=SWSXSYq_{Y,ij} = M\Bigl(\sum_{k} q_{W,ik}\,q_{X,kj} - Z_W\sum_{k} q_{X,kj} - Z_X\sum_{k} q_{W,ik} + K\,Z_W Z_X\Bigr) + Z_Y,\quad M = \frac{S_W S_X}{S_Y}
Expanded per output entry: column sums, row sums and the factor Kمفكوكة لكل عنصر مخرج: مجاميع الأعمدة، ومجاميع الصفوف، والعامل K
TermالحدDepends onيعتمد علىWhenمتىCostالتكلفة
q_W q_Xq_W q_XWeights and inputالأوزان والمدخلEvery inferenceفي كل استدلالN-bit multiplies, int32 addsضرب بـ N بت، وجمع بـ int32
-Z_W q_X-Z_W q_XInputالمدخلEvery inferenceفي كل استدلالColumn sums of q_X, an extra passمجاميع أعمدة q_X، أي مرور إضافي على البيانات
-Z_X q_W-Z_X q_WWeights onlyالأوزان فقطOfflineمسبقًا (offline)Row sums of q_Wمجاميع صفوف q_W
+Z_W Z_X+Z_W Z_XConstantsثوابتOfflineمسبقًا (offline)Really K Z_W Z_Xوهو في الحقيقة K Z_W Z_X
× S_W S_X / S_Y× S_W S_X / S_YConstantsثوابتEvery inferenceفي كل استدلالFixed-point M0 and a shiftM0 بالفاصلة الثابتة مع إزاحة
+Z_Y+Z_YConstantثابتEvery inferenceفي كل استدلالN-bit add, then clampجمع بـ N بت، ثم قصّ (clamp)
Cost map (slide 12)خريطة التكلفة (الشريحة 12)

Why the accumulator is int32لماذا يكون المجمّع int32

int8 × int8 productحاصل ضرب int8 × int8
at most (-128)(-128) = 2^14, so 16 signed bitsلا يتجاوز (-128)(-128) = 2^14، أي 16 بت بإشارة
Sum of K productsمجموع K من حواصل الضرب
about 16 + log2(K) bitsنحو 16 + log2(K) بت
K = 4,096
16 + 12 = 28 bits, fits int3216 + 12 = 28 بت، يتسع في int32
int32 worst-case limitحد int32 في أسوأ حالة
about 131,071 termsنحو 131,071 حدًّا

Fixed-point rescaleإعادة التحجيم بالفاصلة الثابتة

Double M until it lands in [0.5, 1); the count is n. Store M0 as the int32 nearest 2^31 M0 (Q31, at least 2^30), multiply, then rounding right shift by n. Part 03: Quantized matrix multiplication

ضاعف M حتى تقع في [0.5, 1)، وعدد المضاعفات هو n. خزّن M0 كأقرب عدد int32 إلى 2^31 M0 (صيغة Q31، ولا يقل عن 2^30)، ثم اضرب، ثم أزِح لليمين مع التقريب بمقدار n. الجزء 03: ضرب المصفوفات المكمّمة

SWSXSY=M=2−nM0,M0∈[0.5, 1)\frac{S_W S_X}{S_Y} = M = 2^{-n} M_0, \qquad M_0 \in [0.5,\,1)
Normalized multiplier and shiftالمضروب المطبَّع والإزاحة
MMnnM0M0Q31 int32Q31 int32
0.30.3110.60.61,288,490,1891,288,490,189
0.0450.045440.720.721,546,188,2271,546,188,227
0.00720.0072770.92160.92161,979,120,9301,979,120,930
0.0050.005770.640.64Used in part 05مستخدم في الجزء 05
Splitting Mتجزئة M
  • Worked: accumulator 5,000, M = 0.0072: 5,000 × M0_q31 >> 31 = 4,608, then 4,608 >> 7 = 36.مثال محلول: المجمّع 5,000 وM = 0.0072: 5,000 × M0_q31 >> 31 = 4,608، ثم 4,608 >> 7 = 36.
  • The shift alone is too coarse: 2^(-7) = 0.0078 versus 0.0072, about 8% off.الإزاحة وحدها خشنة جدًا: 2^(-7) = 0.0078 مقابل 0.0072، أي خطأ بنحو 8%.

Symmetric quantizationالتكميم المتماثل

Fix Z = 0 and quantize [-|r|max, |r|max], so r = Sq. Weights are bell-shaped around 0, so they lose almost nothing; one-sided ReLU outputs would waste half the codes. Part 04: Symmetric quantization and bias

ثبّت Z = 0 وكمّم المدى [-|r|max, |r|max]، فتصبح r = Sq. توزيع الأوزان جرسي حول 0، لذلك لا تخسر شيئًا تقريبًا، أما مخرجات ReLU أحادية الجانب فستُهدر نصف الرموز. الجزء 04: التكميم المتماثل والانحياز

Sfull=∣r∣max⁡2N−1,Srestricted=∣r∣max⁡2N−1−1S_{\text{full}} = \frac{|r|_{\max}}{2^{N-1}}, \qquad S_{\text{restricted}} = \frac{|r|_{\max}}{2^{N-1} - 1}
Full range (slide 16) and restricted range (not on the slides)المدى الكامل (الشريحة 16) والمدى المقيد (ليس في الشرائح)
Asymmetricغير متماثلSymmetric full rangeمتماثل بالمدى الكاملSymmetric restrictedمتماثل بالمدى المقيّد
Zero pointنقطة الصفرround(q_min - r_min / S)round(q_min - r_min / S)0000
Rangeالمدى[r_min, r_max][r_min, r_max][-|r|max, |r|max][-|r|max, |r|max][-|r|max, |r|max][-|r|max, |r|max]
Scaleالمقياس(r_max - r_min) / (2^N - 1)(r_max - r_min) / (2^N - 1)|r|max / 2^(N-1)|r|max / 2^(N-1)|r|max / (2^(N-1) - 1)|r|max / (2^(N-1) - 1)
INT8 codesرموز INT8[-128, 127][-128, 127][-128, 127][-128, 127][-127, 127][-127, 127]
+|r|max+|r|maxExact endطرف دقيقMaps to 2^(N-1), clippedيقابل 2^(N-1)، فيُقصّExactدقيق
Running matrix, INT8المصفوفة الجارية، INT8S = 0.01255S = 0.01255S = 0.01656, 2.12 → 2.103S = 0.01656، 2.12 → 2.103S = 0.01669S = 0.01669
Running matrix, 2-bitالمصفوفة الجارية، 2 بتS = 1.07, 2.09 → 2.14S = 1.07، 2.09 → 2.14S = 1.06, 2.09 → 1.06S = 1.06، 2.09 → 1.06Not on slidesغير موجود في الشرائح
Typical useالاستخدام المعتادReLU activationsمخرجات ReLUWeights (slides)الأوزان (في الشرائح)Weights (LiteRT)الأوزان (LiteRT)
Asymmetric versus symmetric, |r|max = 2.12غير المتماثل مقابل المتماثل، |r|max = 2.12
qY=SWSXSY(qWqX−ZXqW)+ZYq_Y = \frac{S_W S_X}{S_Y}\big(q_W q_X - Z_X q_W\big) + Z_Y
With Z_W = 0 (slide 17): one runtime product, one precomputed correctionمع Z_W = 0 (الشريحة 17): حاصل ضرب واحد وقت التشغيل، وتصحيح واحد محسوب مسبقًا
  • ReLU6 [0, 6] as INT8: symmetric S = 6/128 = 0.0469, asymmetric S = 6/255 = 0.0235 with Z = -128, half the step.ReLU6 بالمدى [0, 6] كـ INT8: المتماثل يعطي S = 6/128 = 0.0469، وغير المتماثل يعطي S = 6/255 = 0.0235 مع Z = -128، أي نصف الخطوة.
  • Skewed running matrix: symmetric INT8 is about 32% coarser and leaves 63 of 256 codes unused.المصفوفة الجارية المنحرفة: INT8 المتماثل أخشن بنحو 32% ويترك 63 رمزًا من 256 دون استخدام.

Bias quantizationتكميم الانحياز

Give the bias the accumulator's scale and no offset. Part 04: Symmetric quantization and bias

أعطِ الانحياز (bias) مقياس المجمّع نفسه ودون إزاحة (offset). الجزء 04: التكميم المتماثل والانحياز

Zb=0,Sb=SWSX  ⟹  SY(qY−ZY)=SWSX(qWqX−ZXqW+qb)Z_b = 0,\quad S_b = S_W S_X \;\Longrightarrow\; S_Y(q_Y - Z_Y) = S_W S_X\big(q_W q_X - Z_X q_W + q_b\big)
Slide 19الشريحة 19

Bias factsحقائق عن الانحياز

Choiceالاختيار
Z_b = 0, S_b = S_W S_XZ_b = 0, S_b = S_W S_X
Whyالسبب
q_b is already in accumulator units, so it adds as an integer with no second rescaleq_b مكتوب أصلًا بوحدات المجمّع، فيُجمع كعدد صحيح دون إعادة تحجيم ثانية
Exampleمثال
S_W = 0.01, S_X = 0.05, b = 0.37 gives q_b = 740S_W = 0.01، S_X = 0.05، b = 0.37 تعطي q_b = 740
Widthالعرض بالبتات
int32, since int8 would cap the bias at 127 × 0.0005 = 0.0635int32، لأن int8 ستحدّ الانحياز عند 127 × 0.0005 = 0.0635

Integer-only FC and convolution layersطبقات FC وconvolution بالأعداد الصحيحة فقط

Fold the two constants into one int32 q_bias, computed offline. Part 05: Integer-only layers

ادمج الثابتين في q_bias واحد من نوع int32 يُحسب مسبقًا (offline). الجزء 05: طبقات بالأعداد الصحيحة فقط

qY=SWSXSY(qWqX+qbias)+ZY,qbias=qb−ZXqWq_Y = \dfrac{S_W S_X}{S_Y}\left(q_W q_X + q_{\text{bias}}\right) + Z_Y,\qquad q_{\text{bias}} = q_b - Z_X q_W
Fully-connected layer (slides 20 and 21)الطبقة كاملة الاتصال (الشريحتان 20 و21)
qY=SWSXSY(Conv(qW,qX)+qbias)+ZY,qbias=qb−Conv(qW,ZX)q_Y = \dfrac{S_W S_X}{S_Y}\left(\mathrm{Conv}(q_W, q_X) + q_{\text{bias}}\right) + Z_Y,\qquad q_{\text{bias}} = q_b - \mathrm{Conv}(q_W, Z_X)
Convolution layer (slides 22 and 23)طبقة الالتفاف (الشريحتان 22 و23)
Conv(qW,ZX)k=ZX∑c, r, sqW[k,c,r,s]\mathrm{Conv}(q_W, Z_X)_k = Z_X \sum_{c,\,r,\,s} q_W[k, c, r, s]
One constant per output channel; exact at borders only if padding uses the code Z_Xثابت واحد لكل قناة إخراج؛ ويكون دقيقًا عند الحواف فقط إذا استخدم الحشو الرمز Z_X
OperationالعمليةInputsالمدخلاتOutputالمخرجSlide labelالتسمية في الشريحة
Conv or q_W q_XConv أو q_W q_Xint8 × int8int8 × int8int32int32N-bit Int Mult., 32-bit Int Add.N-bit Int Mult., 32-bit Int Add.
Add q_biasإضافة q_biasint32 + int32int32 + int32int32int32Same boxالصندوق نفسه
× S_W S_X / S_Y× S_W S_X / S_Yint32 × M0, shift nint32 × M0، وإزاحة nN-bit intعدد صحيح بـ N بتRescale to N-bit IntRescale to N-bit Int
Add Z_Y, clampإضافة Z_Y ثم القصّint + intint + intint8int8N-bit Int AddN-bit Int Add
Dataflow: narrow, wide, narrowمسار البيانات: ضيق، ثم عريض، ثم ضيق

One neuron in integers (part 05)عصبون واحد بالأعداد الصحيحة (الجزء 05)

Parametersالمعاملات
S_X = 0.05, Z_X = -10; S_W = 0.01, Z_W = 0; S_Y = 0.1, Z_Y = -5S_X = 0.05, Z_X = -10; S_W = 0.01, Z_W = 0; S_Y = 0.1, Z_Y = -5
Codesالرموز
q_W = [50, -30, 20], q_X = [30, 10, 70], q_b = 540q_W = [50, -30, 20], q_X = [30, 10, 70], q_b = 540
Offlineمسبقًا (offline)
q_bias = 540 - (-10)(40) = 940q_bias = 540 - (-10)(40) = 940
Accumulateالتجميع
2600 + 940 = 3540, check 0.0005 × 3540 = 1.772600 + 940 = 3540، وللتحقق 0.0005 × 3540 = 1.77
Rescaleإعادة التحجيم
M = 0.005 = 2^(-7) × 0.64, 3540 × 0.64 / 128 = 17.7 → 18M = 0.005 = 2^(-7) × 0.64, 3540 × 0.64 / 128 = 17.7 → 18
Outputالمخرج
q_Y = 18 - 5 = 13, decodes to 1.8 against 1.77q_Y = 18 - 5 = 13، ويُفكّ إلى 1.8 مقابل 1.77

INT8 results (Jacob et al.)نتائج INT8 (Jacob et al.)

Fixed network: INT8 loses a little. Fixed latency: INT8 MobileNets on Snapdragon 835 big cores reach higher top-1, a better frontier, not a more accurate network. Part 05: Integer-only layers

عند تثبيت الشبكة: يخسر INT8 قليلًا. وعند تثبيت زمن الاستجابة: تصل شبكات MobileNet بـ INT8 على الأنوية الكبيرة لـ Snapdragon 835 إلى دقة top-1 أعلى، وهذا يعني منحنى مفاضلة (frontier) أفضل، لا شبكة أدق. الجزء 05: طبقات بالأعداد الصحيحة فقط

NetworkالشبكةFloatFloatINT8INT8Dropالانخفاض
ResNet-50ResNet-5076.4%76.4%74.9%74.9%-1.5 points-1.5 نقطة
Inception-V3 (ReLU6)Inception-V3 (ReLU6)78.4%78.4%75.4%75.4%-3.0 points-3.0 نقاط
ImageNet top-1 (slide 24)دقة ImageNet top-1 (الشريحة 24)
  • Plain-ReLU Inception-V3 loses more in the paper: 78.3% to 74.2%.Inception-V3 مع ReLU العادية تخسر أكثر في الورقة: من 78.3% إلى 74.2%.
  • About 10% top-1 gap at the 33 ms budget on Snapdragon 835 LITTLE cores; smaller on the Snapdragon 821, whose float path is better optimized.فجوة بنحو 10% في top-1 عند ميزانية 33 ms على الأنوية الصغيرة (LITTLE) لـ Snapdragon 835، وأصغر على Snapdragon 821 لأن مسار الفاصلة العائمة فيه أفضل تحسينًا.

Slide errataأخطاء الشرائح

Answer with the corrected fact, and name the slide if a question depends on it. Part 02, Part 03, Part 04, Part 05

أجب بالمعلومة المصححة، واذكر رقم الشريحة إذا كان السؤال يعتمد عليها. الجزء 02، الجزء 03، الجزء 04، الجزء 05

What the slides get wrongما تخطئ فيه الشرائح

Slides 6, 7, 9الشرائح 6 و7 و9
Draw an 8-dot (3-bit) grid. The numbers use 2 bits, [-2, 1].ترسم شبكة من 8 نقاط (3 بت)، لكن الأرقام تستخدم 2 بت، أي [-2, 1].
Slide 8الشريحة 8
3.20 / 3 = 1.0667, not exactly 1.07. Keep four figures until the end.3.20 / 3 = 1.0667، وليست 1.07 تمامًا. احتفظ بأربعة أرقام معنوية حتى النهاية.
Slide 10الشريحة 10
q_min - r_min / S is -0.991. Only its round() equals -1.قيمة q_min - r_min / S هي -0.991، وround() لها فقط تساوي -1.
Slide 11الشريحة 11
Scalar shorthand: read row sums of q_W, column sums of q_X, and K Z_W Z_X.اختصار بصيغة عددية مفردة: اقرأه على أنه مجاميع صفوف q_W، ومجاميع أعمدة q_X، وK Z_W Z_X.
Slide 13الشريحة 13
M in (0, 1) is empirical, not guaranteed. M ≥ 1 needs a left shift.وقوع M في (0, 1) ملاحظة تجريبية وليس مضمونًا. وإذا كانت M ≥ 1 فنحتاج إزاحة لليسار.
Slide 16الشريحة 16
Full range clips +|r|max by one step. Restricted range is not on the slides.المدى الكامل يقصّ +|r|max بمقدار خطوة واحدة. والمدى المقيّد غير موجود في الشرائح.
Slides 22, 23الشريحتان 22 و23
Titled Fully-Connected Layer but show a convolution layer.عنوانهما Fully-Connected Layer لكنهما تعرضان طبقة convolution.
Slide 23الشريحة 23
Output is labelled q_W; it is q_Y.المخرج مكتوب q_W، والصحيح q_Y.
Slide 24الشريحة 24
"Acurracy" should read "Accuracy".كلمة "Acurracy" صوابها "Accuracy".
Slide 26الشريحة 26
References are copied from the pruning lecture and omit Jacob et al. (CVPR 2018).المراجع منسوخة من محاضرة التقليم (pruning) ولا تذكر Jacob et al. (CVPR 2018).