AI-22 · ARTIFICIAL INTELLIGENCE

실제 손글씨로 CNN 학습·진단·재현CNN training, diagnosis and replication on real digits

실제 손글씨의 원 계수부터 CNN 공동 학습·미분 검산·검증 선택·단순 기준과 재현까지 연결한다.Connect native handwriting counts to joint CNN training, gradient checks, validation choice, simple baselines and replication.

실습 6종 · 풀이 포함 연습문제 42개6 labs · 42 exercises with solutions

학부Undergraduate

손글씨 한 장을 숫자 표로 읽기Read one handwritten image as a numerical table

사람은 종이에 쓴 0과 1을 보고 모양을 구별합니다. 컴퓨터에는 그 모양을 어떻게 전달할까요? 작은 바둑판을 글자 위에 올리고 각 칸에 잉크가 얼마나 들어 있는지 센다고 생각해 보세요. 이 장에서 읽는 실제 손글씨 자료는 그런 작은 수의 표입니다. 글자 모양을 그림으로도 보되, 각 칸의 숫자를 직접 읽어 계산의 재료를 확인합니다.

UCI의 optdigits 원자료는 32×32 비트맵을 겹치지 않는 4×4 블록으로 묶고, 블록마다 켜진 점을 셉니다. 한 블록에는 16개 점이 있으므로 그 값은 0~16입니다. 가로·세로 8개씩 묶인 8×8 표가 남습니다. 표의 64개 값 뒤 마지막 열은 숫자 종류 0~9입니다. 이 마지막 열은 정답이며 입력 그림의 65번째 칸이 아닙니다.

X∈{0,1,…,16}8×8,X~rc=Xrc/16,Y∈{0,1,…,9}X\in\{0,1,\ldots,16\}^{8\times8},\qquad \widetilde X_{rc}=X_{rc}/16,\qquad Y\in\{0,1,\ldots,9\}

실제 표를 16으로 나누면 0은 0, 8은 1/2, 16은 1이 됩니다. 이 변환은 미리 정한 측정 상수를 쓰므로 시험 그림의 평균이나 최대를 보고 맞춘 전처리가 아닙니다. 값 1은 이 블록의 모든 점이 켜졌다는 뜻이지, 그 글자가 숫자 1이라는 뜻이 아닙니다. 입력의 단위와 정답 이름표를 분리해서 읽으세요.

원본 전체 5,620장은 그대로 남기고, 손으로도 추적할 수 있는 실제 0·1 그림 96장을 작은 학습 사례로 씁니다. 이때 0·1 두 종류를 구분하는 결과를 열 종류 전체의 정답률이라고 부르면 안 됩니다. 어떤 표본과 어떤 목표로 계산했는지 먼저 적는 것이 재현 가능한 학습의 시작입니다.

People distinguish a handwritten zero from a one by shape. A computer needs a numerical representation. Imagine placing a small grid over the writing and counting ink within each cell. The observed handwriting data in this chapter are such count tables. We inspect both the image and its individual values so that the numerical calculation remains visible.

The retained UCI optdigits data count active pixels in nonoverlapping 4×4 blocks of normalized 32×32 bitmaps. Each count is an integer from 0 to 16, leaving an 8×8 table. The final column after its 64 entries is the digit label 0..9. That label is not a sixty-fifth image cell.

X∈{0,1,…,16}8×8,X~rc=Xrc/16,Y∈{0,1,…,9}X\in\{0,1,\ldots,16\}^{8\times8},\qquad \widetilde X_{rc}=X_{rc}/16,\qquad Y\in\{0,1,\ldots,9\}

Dividing a count by 16 maps 0 to 0, 8 to 1/2 and 16 to 1. The divisor is a prespecified measurement constant, rather than an average or maximum estimated from test images. An input value of one means that this block is full; it does not mean that the written digit has label one. Keep input units separate from target labels.

All 5,620 original images remain available. A small observed core of 96 zeros and ones makes the training path manageable. Accuracy on this two-class core must not be presented as ten-class benchmark accuracy. State the selected frame and target before interpreting any result.

학부Undergraduate

행·열·부분 창을 차근차근 따라가기Follow rows, columns and local windows

행은 위에서 아래로, 열은 왼쪽에서 오른쪽으로 셉니다. 수학 설명에서는 첫 칸을 (1,1)로 부르기 쉽지만 코드는 보통 (0,0)에서 시작합니다. 둘 중 어느 방식을 쓰든 계산 전에 정해야 합니다. 이 장의 행렬 그림은 위·왼쪽에서 읽고, 코드의 칸 번호와 매개변수 번호는 0부터 셉니다. 파일의 data-row는 첫 관측을 1로 세므로 또 다른 좌표입니다.

전체 그림을 한 번에 외우는 대신 작은 창을 움직이며 같은 계산을 반복해 보겠습니다. 3×3 표 위에 2×2 창을 올리면 왼쪽 위 창은 첫 두 행·첫 두 열을 덮습니다. 오른쪽으로 한 칸 움직이면 첫 두 행·둘째와 셋째 열을 덮습니다. 아래로도 움직여 모든 창을 찾습니다. 각 창에 속하는 값과 마지막 출력 칸을 연결해 그려 보세요.

3×3 표의 네 2×2 창 · 코드의0기준 시작점
출력 위치입력 창 시작포함한 입력 값
(0,0)(0,0)1,2 /4,5
(0,1)(0,1)2,3 /5,6
(1,0)(1,0)4,5 /7,8
(1,1)(1,1)5,6 /8,9

서로 이웃한 창은 입력 칸을 공유합니다. 가운데 값 5는 네 창 모두에 들어갑니다. 따라서 나중에 입력 5에 대한 손실의 미분을 구할 때도 네 경로의 기여를 더해야 합니다. 출력 칸마다 독립된 새 입력을 만든 것으로 계산하면 겹침을 놓칩니다. 반대로 그림의 오른쪽 아래처럼 일부 칸은 적은 창에만 들어가기도 합니다.

작은 창이 보는 범위를 수용영역이라고 부릅니다. 한 층의 2×2 창은 입력 네 칸만 직접 봅니다. 여러 층을 쌓으면 뒤의 한 칸이 간접적으로 보는 원 입력 범위가 커질 수 있습니다. 그렇다고 한 칸이 문자의 의미를 이해한다는 결론이 바로 나오지는 않습니다. 먼저 어느 원 칸이 계산에 연결되는지부터 추적합니다.

Rows run downward and columns to the right. Mathematical exposition often starts at (1,1), whereas code commonly starts at (0,0). Specify the convention. Our diagrams follow the usual spatial arrangement; code coordinates and parameter indices start at zero. A source file’s first observation has one-based data-row 1, which is a different coordinate system.

Instead of memorizing the whole image at once, slide a small window and repeat one calculation. A 2×2 window over a 3×3 table initially covers the first two rows and columns. Moving one column right changes the covered entries, and moving down gives the other positions. Connect each input window to its output location.

Four 2×2 windows of a 3×3 table ·zero-based starts
Output positionInput-window startInput values
(0,0)(0,0)1,2 /4,5
(0,1)(0,1)2,3 /5,6
(1,0)(1,0)4,5 /7,8
(1,1)(1,1)5,6 /8,9

Neighboring windows share inputs. The central value 5 occurs in all four windows, so a derivative with respect to that input must add four paths. Treating every window as an independent new input loses this overlap. Boundary entries can occur in fewer windows.

The input region directly read by a unit is its receptive field. A single 2×2 window reads four entries. Stacking layers can enlarge the original-input region seen indirectly by a later unit. This connectivity statement does not itself establish semantic understanding. Start by tracing which original cells influence each result.

학부Undergraduate

작은 가중치 표를 곱하고 더하기Multiply and add with a small weight table

필터 또는 커널은 창과 같은 크기의 가중치 표입니다. 창의 왼쪽 위 값에는 커널의 왼쪽 위 가중치를 곱하고, 나머지 위치도 짝지어 곱한 뒤 전부 더합니다. 마지막으로 절편을 더합니다. 즉 각 창 안에서 하는 일은 앞에서 배운 내적과 같습니다. 새로운 것은 같은 커널을 여러 위치에 반복 사용한다는 점입니다.

Zrc=bconv+∑a=0kh−1∑b=0kw−1Kab Xr+a,c+bZ_{rc}=b_{\mathrm{conv}}+\sum_{a=0}^{k_h-1}\sum_{b=0}^{k_w-1}K_{ab}\,X_{r+a,c+b}

창이 [[1,2],[3,4]], 커널이 [[1,0],[0,−1]], 절편이1/2라면 결과는1×1+0×2+0×3−1×4+1/2=−5/2입니다. 음수가 나왔다는 이유로 틀린 계산이 아닙니다. 이 값은 해당 패턴에 대한 선형 응답입니다. ReLU로 음수를0으로 바꾸는 단계는 뒤에 따로 적용하므로, 순전파의 어느 단계인지 구분해 기록합니다.

영상에서는 흔히 이 연산을 합성곱이라고 부르지만 위 식은 커널을 뒤집지 않는 교차상관입니다. 수학의 이산 합성곱은 커널의 방향을 뒤집는 정의를 쓰기도 합니다. 학습 가능한 커널이라는 이유로 구현의 정의를 생략하면 손계산과 코드가 서로 달라 보일 수 있습니다. 이 장은 커널을 뒤집지 않는 valid 교차상관으로 고정합니다.

커널의 양·음 가중치는 어떤 위치의 차이에 민감하게 만듭니다. 하지만 사람이 “모서리 검출기”라고 이름 붙인 표와 자료에서 학습한 커널은 다릅니다. 예쁘게 보이는 필터가 나왔다고 정답률이 좋거나 인과적으로 의미 있는 특징을 찾았다고 결론 내리지 않습니다. 뒤에서는 실제 손실과 검증 결과를 함께 읽습니다.

A filter or kernel is a weight table matching the local window. Pair each window entry with its corresponding kernel weight, multiply, add all products, and include a bias. Inside one window this is an ordinary dot product. The distinctive feature is reusing the same kernel at multiple positions.

Zrc=bconv+∑a=0kh−1∑b=0kw−1Kab Xr+a,c+bZ_{rc}=b_{\mathrm{conv}}+\sum_{a=0}^{k_h-1}\sum_{b=0}^{k_w-1}K_{ab}\,X_{r+a,c+b}

For window [[1,2],[3,4]], kernel [[1,0],[0,−1]] and bias 1/2, the result is 1×1+0×2+0×3−1×4+1/2=−5/2. A negative response is not a mistake. It is a linear pattern response. ReLU’s replacement of negative values by zero happens later, so record which stage a displayed value belongs to.

Vision practice often calls this operation convolution, although the displayed formula is cross-correlation without reversing the kernel. Mathematical discrete convolution may reverse its orientation. Learnable weights do not remove the need to state the implementation convention. This chapter uses valid cross-correlation with no kernel reversal.

Positive and negative weights can make a filter sensitive to spatial differences. A hand-labeled “edge detector” differs from a kernel learned from data. Attractive filter pictures establish neither high accuracy nor causal meaning. We will read the loss and validation results alongside the visualizations.

학부Undergraduate

매개변수 공유가 줄이는 것과 줄이지 않는 것What parameter sharing reduces and what it does not

8×8 입력에서 3×3 커널을 한 칸씩 움직이면 6×6, 즉36개 위치를 계산합니다. 위치마다 다른3×3 가중치와 절편을 두면 36×(9+1)=360개 매개변수가 필요합니다. 하나의 커널과 절편을 공유하면 이 층은10개만 학습합니다. 위치마다 완전히 다른 계산을 외우는 대신 같은 작은 패턴을 여러 위치에서 찾게 하는 제약입니다.

이 장의 작은 CNN은 공유 커널 뒤 ReLU를 적용하고, 출력 공간의 값들을 행 순서대로 펼쳐 최종 선형 층에 넣습니다. 6×6 활성값36개에 대한 출력 가중치36개와 출력 절편1개가 더 있으므로 전체 학습 매개변수는9+1+36+1=47개입니다. 커널만 세어서 “매개변수10개인 전체 모형”이라고 말하면 출력층을 빠뜨립니다.

동일한64입력·36중간값·1출력의 매개변수 수
연결 방식첫 층출력 층합계
완전연결 64→36→164×36+36=234036+1=372377
위치별 독립3×3창36×(9+1)=36036+1=37397
공유3×3커널9+1=1036+1=3747

공유를 한다고 전체 예측이 평행이동에 불변인 것은 아닙니다. 경계에서 창의 포함 범위가 달라지고, 마지막 출력층의 위치별 가중치도 서로 다를 수 있습니다. 입력을 한 칸 옮기면 일부 안쪽 응답의 위치가 대응할 수 있다는 성질과 최종 분류가 반드시 같다는 성질은 다릅니다. valid 경계·이동 보폭·풀링·출력층까지 모두 살펴야 합니다.

매개변수가 적다고 자동으로 더 잘 일반화하지도 않습니다. 맞는 공유 제약은 효율적일 수 있지만 잘못된 제약은 필요한 정보를 지울 수 있습니다. 손글씨의 가까운 칸에는 공간적 이유가 있습니다. 반면 아홉 해의 성장률을3×3으로 접은 표에서는 위아래 이웃의 뜻을 새로 설명해야 합니다. 배열을 만들 수 있다는 사실과 그 배열의 이웃 관계가 적절하다는 판단은 별개입니다.

A stride-one 3×3 kernel over an 8×8 input has 36 output positions. Giving every position its own nine weights and bias would require 360 parameters. Sharing one kernel and bias reduces that layer to ten. The restriction encourages the same small pattern to be useful at several positions rather than learning an unrelated calculation everywhere.

Our tiny CNN applies ReLU and flattens its 6×6 spatial responses into a linear readout. That head adds 36 weights and one output bias, giving 9+1+36+1=47 trainable parameters. Counting only the ten convolution parameters omits the head.

Parameters for 64 inputs,36 intermediate values and one output
ConnectivityFirst layerOutput layerTotal
Dense 64→36→164×36+36=234036+1=372377
Independent 3×3 local windows36×(9+1)=36036+1=37397
Shared 3×3 kernel9+1=1036+1=3747

Sharing does not make the final prediction translation invariant. Boundaries change which entries are included, and the flattened head can weight spatial locations differently. Corresponding interior responses after a shift and an unchanged final decision are different properties. Examine valid boundaries, stride, pooling and the head before making an invariance claim.

Fewer parameters do not automatically guarantee better generalization. A useful sharing restriction can help, whereas a poor one can remove necessary information. Nearby handwriting cells have a spatial interpretation. Folding nine annual growth values into a 3×3 table requires a separate explanation of vertical neighbors. The ability to construct an array does not establish the suitability of its neighborhoods.

학부Undergraduate

출력 크기·보폭·빠지는 경계 확인하기Check output size, stride and omitted boundaries

창이 원 입력 밖으로 나가면 계산하지 않는 방식을 valid라고 부릅니다. 가로 길이 W, 커널 가로 길이 k_w, 이동 보폭 s라면 창의 시작점은0,s,2s,… 가운데 시작점+k_w≤W인 것들입니다. 그 개수를 세면 아래 식을 얻습니다. 세로도 같은 원리입니다. 나누어떨어지지 않을 때는 마지막 불완전 창을 만들지 않으므로 바닥함수가 필요합니다.

Hout=⌊H−khs⌋+1,Wout=⌊W−kws⌋+1H_{\rm out}=\left\lfloor\frac{H-k_h}{s}\right\rfloor+1,\qquad W_{\rm out}=\left\lfloor\frac{W-k_w}{s}\right\rfloor+1

8×8에3×3,보폭1이면6×6입니다. 보폭2이면 시작점0,2,4만 가능하므로3×3입니다. 마지막 시작4는 칸4,5,6을 읽고 칸7은 그 방향에서 사용되지 않습니다. 창을 빨리 움직이는 대신 어떤 경계 값이 빠지는지 확인하세요. 결과 크기를 반올림하거나 임의의0을 더해 맞추면 다른 연산이 됩니다.

패딩은 원 입력 주위에 값을 더하는 별도 설계입니다. 0을 두를 수도 있지만, 측정되지 않은 바깥이 실제로0이라는 관측을 얻은 것은 아닙니다. 이 장의 계산기는 패딩 없이 valid 연산을 씁니다. 실데이터 CNN의 보폭은1로 고정하고, 첫 실습의 교차상관에서만 보폭을 바꾸어 모양을 비교합니다.

커널은 입력보다 작거나 같아야 하고, 행렬의 모든 행 길이가 같아야 합니다. 3×3이라고 표시했는데 둘째 행 값이 두 개라면 계산 전에 거절하는 편이 정확합니다. 숫자 표의 결측을0으로 채우는 결정도 입력 검증과 다릅니다. 원래0인 칸과 관측되지 않은 칸을 구분하지 않으면 그림과 계산의 의미가 바뀝니다.

A valid operation uses only windows lying entirely within the input. For width W, kernel width k_w and stride s, possible starts are 0, s,2 s,… satisfying start+k_w≤W. Counting them yields the formula below; height follows the same argument. A floor is needed because an incomplete final window is not created.

Hout=⌊H−khs⌋+1,Wout=⌊W−kws⌋+1H_{\rm out}=\left\lfloor\frac{H-k_h}{s}\right\rfloor+1,\qquad W_{\rm out}=\left\lfloor\frac{W-k_w}{s}\right\rfloor+1

An 8×8 input with a 3×3 kernel gives 6×6 at stride one and 3×3 at stride two. The latter starts only at 0,2,4; its final window reads indices 4,5,6, leaving index 7 unused in that direction. Inspect what is omitted when the window moves faster. Rounding the output size or adding arbitrary zeros defines a different operation.

Padding is a separate choice to extend the input boundary. Zero padding does not establish that unobserved space outside an image was measured as zero. Our calculations use valid operations without padding. The actual-data CNN fixes stride at one; the first cross-correlation lab permits stride changes for comparison.

The kernel must fit the input and every matrix row must have the same length. A claimed 3×3 input whose second row has only two entries should be rejected before calculation. Filling missing observations with zero is a separate modeling choice. Confusing a measured zero with an absent value changes the meaning of both image and computation.

학부Undergraduate

실습 A: 창의 값과 출력 표를 대조하기Lab A: match window entries to the output table

입력 [[1,2,3],[4,5,6],[7,8,9]], 커널 [[1,0],[0,−1]], 절편1/2, 보폭1로 시작합니다. 이 표는 계산을 익히기 위한 가상 작은 예이며 실제 손글씨 원 관측은 뒤에서 읽습니다. 네 창 모두 왼쪽 위 값과 오른쪽 아래 값의 차이가−4이므로 출력 네 칸은 전부−7/2입니다. 먼저 직접 계산하고 정확값 표를 펼쳐 확인하세요.

보폭만2로 바꾸면 왼쪽 위에서 시작하는 창 하나만 남습니다. 출력은1×1이고 값은 여전히−7/2입니다. 보폭을1로 복원한 뒤 절편을0으로 바꾸면 네 출력은−4입니다. 앞 실험의 절편을 남겨 두고 손계산의−4와 비교하면 다른 조건을 비교한 셈이 됩니다. 한 번에 바꾸는 조건을 적어 두세요.

그다음 커널만 [[−1,0],[0,1]]로 바꾸고 절편을1/2로 복원합니다. 네 출력은9/2가 됩니다. 이것은 앞 커널의 방향을 뒤집은 값이지, 원래 입력 그림을 새로 관측한 것이 아닙니다. 필터를 바꾸는 실험과 데이터를 바꾸는 실험을 구분해 결과 표에 이름을 붙입니다.

마지막으로 입력 둘째 행을 [4,5]로 줄이면 직사각형이 아니므로 거절되어야 합니다. 오류를 본 뒤 원래3×3 입력으로 복원하세요. 이 실습에서는 음수 출력이 그대로 보입니다. 다음 단계에서 ReLU를 붙일 때 어떤 값이0이 되는지 예측한 뒤 확인하면 비선형 층의 역할을 더 잘 이해할 수 있습니다.

Start with input [[1,2,3],[4,5,6],[7,8,9]], kernel [[1,0],[0,−1]], bias 1/2 and stride one. This is a stipulated small arithmetic example; observed handwriting comes later. In each of four windows the upper-left entry minus the lower-right entry is −4, so every output is −7/2. Calculate first, then open the exact-value table.

Changing only stride to two leaves a single upper-left window. The output becomes 1×1 while its value stays −7/2. Restore stride one, then change bias to zero: all four outputs become −4. Retaining a previous bias while comparing with a different hand calculation changes the question. Record the condition altered at each step.

Next use kernel [[−1,0],[0,1]] and restore bias 1/2. All four outputs become 9/2. This reverses the previous kernel; it does not create a newly observed input image. Label a filter-change experiment separately from a data-change experiment.

Finally shorten the second input row to [4,5]. A nonrectangular matrix should be rejected. Restore the original 3×3 input afterward. Negative responses remain visible in this lab. Predict which entries ReLU will replace by zero before adding that next stage.

학부Undergraduate

ReLU는 무엇을 지우고 어떤 미분을 쓰는가What ReLU removes and which derivative is used

필터 응답 Z가 음수일 수도 있다는 것을 보았습니다. ReLU는 양수는 그대로 두고 음수와0은0으로 바꾸는 함수입니다. 문을 떠올리면 양수인 응답만 통과시키는 셈입니다. 다만 이 비유의 문은 사람이 정답을 보고 여는 문이 아닙니다. 현재 커널·입력·절편으로 계산한 Z의 부호만 읽습니다.

Arc=max⁡(0,Zrc),∂Arc∂Zrc={1,Zrc>0,0,Zrc<0.A_{rc}=\max(0,Z_{rc}),\qquad \frac{\partial A_{rc}}{\partial Z_{rc}}=\begin{cases}1,&Z_{rc}>0,\\0,&Z_{rc}<0.\end{cases}

Z=0에서는 왼쪽 기울기0과 오른쪽 기울기1이 달라 보통 의미의 도함수가 없습니다. 이 장의 계산은 그 꺾임에서0을 선택합니다. 이는 계산 규칙이지 미분 가능하다는 증명이 아닙니다. 뒤의 중앙 차분 실습에서는 작은 이동이 꺾임을 넘는지 따로 확인합니다.

모든 Z가 음수이면 활성값은 모두0입니다. 이때 데이터 손실에서 커널로 전달되는 선택한 기울기가0일 수 있습니다. 그러나 출력 절편은 여전히 학습될 수 있고, 다른 커널이나 절편을 쓰면 더 작은 손실이 있을 수도 있습니다. 따라서 “기울기0”과 “전체 매개변수 공간에서 최적”을 구분해야 합니다.

원 입력의 검은 칸이0이 되는 경우와 ReLU가 중간 응답을0으로 만드는 경우도 다릅니다. 첫 값은 관측된 블록 계수이고 둘째는 모형이 계산한 활성값입니다. 실제 그림·교차상관 응답·ReLU 활성 맵을 나란히 읽으면 어느 단계에서 정보가 달라지는지 볼 수 있습니다.

A filter response Z may be negative. ReLU keeps positive responses and replaces nonpositive responses by zero. Think of a gate admitting only positive responses, but not a gate opened after inspecting the correct label. It reads only the sign computed from the current input, kernel and bias.

Arc=max⁡(0,Zrc),∂Arc∂Zrc={1,Zrc>0,0,Zrc<0.A_{rc}=\max(0,Z_{rc}),\qquad \frac{\partial A_{rc}}{\partial Z_{rc}}=\begin{cases}1,&Z_{rc}>0,\\0,&Z_{rc}<0.\end{cases}

At Z=0 the left slope is zero and the right slope is one, so an ordinary derivative does not exist. Our implementation chooses zero there. That convention is not a proof of differentiability. The later centered-difference lab separately checks whether a perturbation crosses a kink.

If every preactivation is negative, every activation is zero and the chosen data gradient reaching the kernel can vanish. The output bias may still learn, and a different kernel or bias may have lower loss. A zero local chosen gradient is different from a global optimum over parameters.

A measured zero input and a computed zero activation also differ. The former is an observed block count; the latter is produced by a model transformation. Reading the native image, raw cross-correlation map and ReLU map side by side identifies where the representation changes.

학부Undergraduate

활성 맵을 펼쳐 하나의 점수로 만들기Flatten activations into one output score

활성 맵을 첫 행 왼쪽에서 오른쪽으로 읽고, 다음 행으로 내려가 한 줄로 놓는 것을 펼치기라고 부릅니다. 2×2 표 [[1,0],[3,0]]은 [1,0,3,0]이 됩니다. 숫자를 섞거나 평균을 낸 것이 아니라 위치 순서를 정한 것입니다. 마지막 선형 층의 가중치도 같은 순서로 대응해야 합니다.

a=vec⁡row(A),fθ(X)=bo+∑j=1mhjaja=\operatorname{vec}_{\rm row}(A),\qquad f_\theta(X)=b_o+\sum_{j=1}^{m}h_j a_j

예를 들어 펼친 활성값이 [1,0,3,0], 출력 가중치가 [1,2,−1,4], 출력 절편이1/2이면 점수는1−3+1/2=−3/2입니다. 합성곱 커널의 매개변수 K와 출력 가중치 h는 다른 층입니다. 이 장의 학습은 둘 다 바꾸므로, 커널을 미리 고정하고 출력층만 맞추는 방법과 다릅니다.

펼친 뒤 가중치를 곱하는 방식은 위치 정보를 사용합니다. 같은 활성값이 왼쪽 위와 오른쪽 아래에 있을 때 h가 다르면 최종 점수도 달라집니다. 전역 평균 풀링은 모든 위치를 먼저 평균내는 별도 설계이며 매개변수 수와 위치 의존성이 달라집니다. 여기서는 어떤 계산을 썼는지 손으로 추적하기 위해 펼친 선형 층을 명시합니다.

최종 점수 f는 어떤 실수도 될 수 있습니다. 이진 분류에서 f≥1/2를 라벨1로 읽는 규칙을 정할 수 있지만, 그렇다고 f 자체가 검증된 확률은 아닙니다. 기업의 매출 사례에서는 정규화한 매출 수준을 예측하는 실수입니다. 같은 선형 출력층이라도 목표와 단위가 다르면 해석이 달라집니다.

Flattening reads the activation map from left to right within each row, then continues with the next row. Thus [[1,0],[3,0]] becomes [1,0,3,0]. This rearranges positions without averaging or mixing them. The head weights must follow the same ordering.

a=vec⁡row(A),fθ(X)=bo+∑j=1mhjaja=\operatorname{vec}_{\rm row}(A),\qquad f_\theta(X)=b_o+\sum_{j=1}^{m}h_j a_j

With activations [1,0,3,0], head weights [1,2,−1,4] and output bias 1/2, the score is 1−3+1/2=−3/2. Kernel weights K and head weights h belong to different layers. Our training updates both, unlike fitting only a readout over a frozen filter.

A flattened head uses location. Equal activations in different spatial cells can receive different head weights and change the prediction. Global average pooling is a separate architecture with different parameter counts and location dependence. We state the flattened head explicitly to keep each calculation traceable.

The final linear score can be any real number. A binary rule can predict label one when f≥1/2, but this does not certify f as a probability. The company case instead predicts normalized nominal sales. The same output-layer algebra has different interpretations under different targets and units.

학부Undergraduate

손실의 단위와 평균 제곱오차Loss units and mean squared error

정답과 점수가 얼마나 다른지 재는 규칙이 손실입니다. 한 행에서 오차 e=f−y를 구하고 제곱하면 부호가 사라져 크기를 비교할 수 있습니다. 여러 행을 학습할 때는 제곱오차를 모두 더하고 행 수 N으로 나눈 평균 제곱오차를 씁니다. 이 장에서는 데이터 손실 앞에1/2를 붙이지 않으므로 미분할 때2가 나옵니다.

ei=fθ(Xi)−yi,Ldata(θ)=1N∑i=1Nei2e_i=f_\theta(X_i)-y_i,\qquad L_{\rm data}(\theta)=\frac1N\sum_{i=1}^{N}e_i^2

예측이5/2이고 목표가1이면 오차는3/2, 제곱오차는9/4입니다. 점수가 라벨 범위0~1 밖이라는 사실을 숨기려고 점수를 임의로 잘라내지 않습니다. 잘라내기는 다른 함수와 다른 미분을 만듭니다. 이진 표에서 제곱오차를 최소화하는 연습과 확률 모형의 로그우도를 최대화하는 연습도 같은 목적함수가 아닙니다.

이론적으로 적절한 조건 아래 이진 Y에 대한 기대 제곱손실의 최적 함수는 조건부 평균 P(Y=1|X)입니다. 그러나 유한 자료·제한한 CNN·유한 반복으로 얻은 현재 점수가 바로 그 최적 함수라는 결론은 나오지 않습니다. 함수가0~1을 벗어날 수도 있고, 확률 보정과 새로운 집단의 성능도 별도 평가가 필요합니다.

실제 손글씨 사례의 y는 숫자0 또는1입니다. 국가 사례는 비음수 성장 여부0/1이며, 기업 사례는 명목 매출을300000으로 나눈 연속 값입니다. 마지막 사례에서 예측오차를 원 백만 달러 단위로 바꾸려면 오차에300000을 곱합니다. MSE는 제곱 단위이므로300000²을 곱해야 합니다. 단위 변환과 모형 개선을 혼동하지 마세요.

A loss specifies how to measure a prediction discrepancy. For one observation let e=f−y and square it to remove its sign. Training uses the average of these squared errors over N rows. Our data loss has no leading factor of 1/2, so its derivative contains a factor of two.

ei=fθ(Xi)−yi,Ldata(θ)=1N∑i=1Nei2e_i=f_\theta(X_i)-y_i,\qquad L_{\rm data}(\theta)=\frac1N\sum_{i=1}^{N}e_i^2

A score of 5/2 with target one has error 3/2 and squared error 9/4. We do not silently clip scores into [0,1]: clipping changes the function and its derivative. Minimizing binary squared loss and maximizing a probability model’s log likelihood are also different objectives.

Under suitable conditions, the population squared-loss minimizer for binary Y is the conditional mean P(Y=1|X). A restricted CNN trained on finite data for finitely many iterations need not equal that minimizer. Its scores may leave [0,1], and calibration or performance in a new group still requires evaluation.

Observed handwriting targets are zero or one. Country targets indicate nonnegative growth, while company targets are nominal sales divided by 300000. In the latter case multiply an error by 300000 to return to USD-million units; multiply MSE by 300000² because it has squared units. A unit conversion is not a model improvement.

학부Undergraduate

공유 커널의 기울기를 모든 창에서 더하기Sum shared-kernel gradients over all windows

학습은 매개변수를 조금 바꾸었을 때 손실이 어느 방향으로 움직이는지 읽습니다. 먼저 한 관측에서 출력 점수로 전달되는 손실 미분은 δ=2(f−y)입니다. 평균 손실을 여러 관측에서 계산하면 각 관측의 기여를 더하고 N으로 나눕니다. 출력 절편은 점수에 그대로 더해지므로 그 미분은 δ입니다.

δi=2(fθ(Xi)−yi)N,∂Ldata∂hj=∑iδiaij,∂Ldata∂bo=∑iδi\delta_i=\frac{2(f_\theta(X_i)-y_i)}{N},\quad \frac{\partial L_{\rm data}}{\partial h_j}=\sum_i\delta_i a_{ij},\quad \frac{\partial L_{\rm data}}{\partial b_o}=\sum_i\delta_i

활성값 a_j로 가는 기여에는 출력 가중치 h_j가 곱해집니다. ReLU 응답이 양수인 창만 선택한 미분을 통과시킵니다. 그러면 커널 K_ab를 미분할 때 그 창 안의 입력 X_(r+a,c+b)를 곱합니다. 같은 K_ab가 모든 창에 사용되므로 이 값을 모든 창·모든 학습 행에 걸쳐 더해야 합니다.

∂Ldata∂Kab=∑i∑r,cδihj(r,c)1{Zirc>0}Xi,r+a,c+b\frac{\partial L_{\rm data}}{\partial K_{ab}}=\sum_i\sum_{r,c}\delta_i h_{j(r,c)}\mathbf1\{Z_{irc}>0\}X_{i,r+a,c+b}
∂Ldata∂bconv=∑i∑r,cδihj(r,c)1{Zirc>0}\frac{\partial L_{\rm data}}{\partial b_{\mathrm{conv}}}=\sum_i\sum_{r,c}\delta_i h_{j(r,c)}\mathbf1\{Z_{irc}>0\}

이는 커널을 위치마다 따로 학습한 뒤 평균내는 절차가 아닙니다. 하나의 매개변수에 여러 계산 경로가 연결되어 있어 연쇄법칙으로 기여를 더하는 것입니다. 입력 칸의 미분도 겹치는 창에서 온 경로를 더합니다. 원 입력의 미분은 이 모형의 국소 민감도이지, 실제 사진·사람·경제를 바꾸는 인과효과는 아닙니다.

커널과 출력 가중치에 L2 벌점을 더하면 해당 미분에 λK_ab 또는 λh_j가 더해집니다. 이 장은 두 절편에는 벌점을 주지 않습니다. 어떤 매개변수에 벌점을 주었는지 적어야 같은 λ라는 숫자를 비교할 수 있습니다. 입력의 미분에는 이 매개변수 벌점의 직접 기여가 없습니다.

Training asks how loss changes after a small parameter change. For one observation the loss derivative reaching the score is δ=2(f−y). For a mean over several rows, sum row contributions divided by N. Because the output bias is added directly, its derivative is δ.

δi=2(fθ(Xi)−yi)N,∂Ldata∂hj=∑iδiaij,∂Ldata∂bo=∑iδi\delta_i=\frac{2(f_\theta(X_i)-y_i)}{N},\quad \frac{\partial L_{\rm data}}{\partial h_j}=\sum_i\delta_i a_{ij},\quad \frac{\partial L_{\rm data}}{\partial b_o}=\sum_i\delta_i

The derivative reaching activation a_j is multiplied by head weight h_j and passes the chosen ReLU derivative only at a positive preactivation. Differentiating kernel entry K_ab then multiplies by the corresponding input entry. The same parameter occurs in every window, so contributions sum over all windows and training observations.

∂Ldata∂Kab=∑i∑r,cδihj(r,c)1{Zirc>0}Xi,r+a,c+b\frac{\partial L_{\rm data}}{\partial K_{ab}}=\sum_i\sum_{r,c}\delta_i h_{j(r,c)}\mathbf1\{Z_{irc}>0\}X_{i,r+a,c+b}
∂Ldata∂bconv=∑i∑r,cδihj(r,c)1{Zirc>0}\frac{\partial L_{\rm data}}{\partial b_{\mathrm{conv}}}=\sum_i\sum_{r,c}\delta_i h_{j(r,c)}\mathbf1\{Z_{irc}>0\}

This does not train an independent kernel at each location and average them afterward. Several paths use one parameter; the chain rule adds their effects. Input derivatives likewise sum overlapping-window paths. Such a derivative measures local model sensitivity, not the causal effect of changing a photograph, person or economy.

Adding an L2 penalty contributes λK_ab and λh_j to the corresponding parameter derivatives. Both biases are unpenalized here. Specify which parameters receive a penalty before comparing numerical λ values. This parameter penalty adds no direct term to the input derivative.

학부Undergraduate

한 번의 역전파를 끝까지 손으로 계산하기Work through one complete backward pass

입력 [[1,2],[3,4]], 커널 [[1]], 합성곱 절편0을 씁니다. 네 양의 응답은 ReLU 뒤에도 [1,2,3,4]입니다. 출력 가중치를 네 개 모두1/4, 출력 절편0으로 두면 점수는 평균5/2입니다. 목표1과 비교한 오차는3/2, 데이터 손실은9/4입니다. 이 예는 작은 숫자로 만든 계산 연습이며 실제 원 손글씨는 뒤에서 같은 원리로 읽습니다.

벌점λ=0인 한 행의 정확한 미분
매개변수·입력계산미분
출력 절편2×3/23
출력 가중치 h3×[1,2,3,4][3,6,9,12]
합성곱 절편3×(1/4+1/4+1/4+1/4)3
공유 커널 K003×(1+2+3+4)/415/2
각 입력 칸3×1/4×13/4

커널이 한 칸이어도 같은 K00가 네 위치에 반복됩니다. 따라서15/2는 네 경로의 합입니다. 출력 가중치는 위치마다 독립된 매개변수라 각각3,6,9,12가 됩니다. 이 차이를 구분하지 않고 모든 기울기를 평균 하나로 만들면 다른 모형을 학습하게 됩니다.

λ=1/5로 바꾸면 커널 미분에는1/5가 더해져77/10, 각 출력 가중치 미분에는1/20이 더해집니다. 절편 미분3은 그대로입니다. 벌점은 (λ/2)(1²+4×(1/4)²)=1/8이고 목적함수는9/4+1/8=19/8입니다. 벌점을 데이터 손실로 표시하지 않고 둘을 따로 읽는 이유가 여기 있습니다.

예측값·제곱오차·미분이 모두 같은 종류의 숫자는 아닙니다. 미분의 단위는 손실 단위를 매개변수 단위로 나눈 것입니다. 입력을16배 바꾸고 가중치 초기값은 그대로 두면 함수와 미분의 크기가 달라집니다. “학습률0.1이면 언제나 적당하다”는 규칙 대신 현재 단위와 기울기를 함께 확인합니다.

Take input [[1,2],[3,4]], a one-entry kernel [[1]] and zero convolution bias. All preactivations are positive, so flattening after ReLU gives [1,2,3,4]. Four head weights of 1/4 and zero output bias give score 5/2. With target one, error is 3/2 and data loss is 9/4. This is a stipulated arithmetic example; observed handwriting follows the same principles later.

Exact derivatives for one row andλ=0
Parameter/inputCalculationDerivative
Output bias2×3/23
Head weights h3×[1,2,3,4][3,6,9,12]
Convolution bias3×(1/4+1/4+1/4+1/4)3
Shared kernel K003×(1+2+3+4)/415/2
Each input cell3×1/4×13/4

Even a one-entry kernel reuses K00 at four locations, so 15/2 adds four paths. Head weights are separate parameters and receive different derivatives 3,6,9,12. Replacing them all by one averaged gradient would train a different architecture.

At λ=1/5 the kernel derivative gains 1/5, becoming 77/10. Each head derivative gains 1/20. Bias derivatives remain three. The penalty is (λ/2)(1²+4×(1/4)²)=1/8, so the objective is 9/4+1/8=19/8. Keep data loss and parameter penalty separate.

Scores, squared errors and derivatives have different units. A derivative has loss units divided by parameter units. Scaling inputs by sixteen while leaving initialization fixed changes both the function and derivative magnitudes. Inspect units and gradients instead of assuming one numerical learning rate is universally suitable.

학부Undergraduate

실습 B: 전체 미분과 꺾임을 확인하기Lab B: inspect the complete gradient and kinks

기본 입력 [[1,2],[3,4]], 모형 {"kernel":[["1"]],"convBias":"0","head":["1/4","1/4","1/4","1/4"],"outputBias":"0"}, 목표1, λ=0을 계산합니다. 점수5/2, 데이터 손실9/4와 앞 절의 전체 미분을 대조하세요. 커널 표만 보지 말고 출력층·두 절편·입력 미분까지 확인합니다.

λ를1/5로 바꾸고 벌점1/8과 목적함수19/8을 확인합니다. 그다음 λ를0으로 복원하고 목표를5/2로 바꿉니다. 이 값은 실제 숫자 라벨을 바꾸는 것이 아니라, 일반 실수 목표를 가진 가상 미분 실험입니다. 데이터 오차0에서 모든 데이터 기울기가0인지 확인하세요. 이어 λ=1/5로 바꾸면 가중치 벌점 미분이 다시 나타나야 합니다.

다음 실험 전 목표1, λ=0을 복원합니다. 커널을 [[0]], 합성곱 절편을0으로 바꾸고 출력 가중치는1/4씩, 출력 절편0을 유지합니다. 모든 응답이 ReLU 꺾임0이며 선택한 커널·합성곱 절편·출력 가중치의 데이터 미분은0입니다. 그러나 출력 절편의 미분은−2입니다. 이를 전체 최적점이라고 해석하지 마세요.

이제 합성곱 절편만1/10로 바꾸면 모든 창이 활성화되어 커널로 전달되는 미분도 달라집니다. 마지막에는 처음의 완전한 기본 모형 JSON·목표1·λ0을 복원합니다. 서로 다른 실험의 절편이나 벌점이 남아 있으면 손계산과 화면은 같은 질문에 답하지 않습니다. 실제 훈련은 다음 실습에서 이 미분을 반복 사용합니다.

Calculate the default input [[1,2],[3,4]], model {"kernel":[["1"]],"convBias":"0","head":["1/4","1/4","1/4","1/4"],"outputBias":"0"}, target one and λ=0. Match score 5/2, data loss 9/4 and every derivative from the previous section. Inspect both biases, head weights and input derivatives, not just the kernel.

Set λ=1/5 and verify penalty 1/8 and objective 19/8. Restore λ=0 before setting the target to 5/2. This is a hypothetical real-valued derivative exercise, not a relabeling of an observed digit. At zero error all data gradients vanish. Returning λ to 1/5 should restore weight-penalty gradients.

Before the next experiment restore target one and λ=0. Use kernel [[0]] and convolution bias zero, keeping four head weights of 1/4 and output bias zero. Every preactivation is at a ReLU kink. The chosen data gradients for kernel, convolution bias and head are zero, but the output-bias derivative is −2. This is not evidence of a global optimum.

Change only convolution bias to 1/10. All windows become active and gradients reaching the kernel change. Finally restore the complete original model JSON, target one and λ=0. Retaining a previous bias or penalty changes the question answered by the screen. The next lab repeatedly applies these gradients during training.

학부Undergraduate

미분을 실제 가중치 변경으로 연결하기Turn a gradient into an actual parameter update

기울기는 값을 바꾸는 방향과 크기에 관한 국소 정보입니다. 양의 기울기라면 그 매개변수를 조금 줄이는 쪽이 일차 근사에서 손실을 줄이고, 음의 기울기라면 조금 늘리는 쪽입니다. 경사하강법은 현재 기울기에 학습률 η를 곱한 값을 현재 매개변수에서 뺍니다. η는 양수이며 손실과 매개변수 단위에 따라 적절한 크기가 달라집니다.

θ(t+1)=θ(t)−η∇L(θ(t)),η>0\theta^{(t+1)}=\theta^{(t)}-\eta\nabla L\bigl(\theta^{(t)}\bigr),\qquad \eta>0

한 단계의 모든 기울기는 같은 이전 모형 θ^(t)에서 계산합니다. 먼저 커널을 바꾼 뒤 새 커널로 출력층 기울기를 다시 계산하면 이 식과 다른 갱신입니다. 이 장의 계산은 이전 모형과 기울기를 따로 보존하고, 커널·합성곱 절편·출력 가중치·출력 절편을 동시에 갱신합니다.

“내려간다”는 이름이 모든 보폭에서 손실이 줄어든다는 보장은 아닙니다. 곡선의 기울기를 따라 너무 멀리 가면 낮은 곳을 지나 반대편으로 올라갈 수 있습니다. CNN에는 ReLU 경계와 여러 층의 곱이 있어 손실이 매개변수에 대해 일반적으로 볼록하지도 않습니다. 정상적으로 실행한 유한 반복을 전역 최적화 증명으로 표시하지 않습니다.

계산 화면에는0단계도 남깁니다.0단계는 입력한 초기 모형의 평가이며 아직 갱신하지 않았습니다. 갱신을8번 하면0부터8까지9개 체크포인트가 생깁니다. “9개가 보이니9번 학습했다”라고 세지 말고 초기 평가와 실제 갱신 횟수를 분리하세요.

A gradient gives local information about how a parameter change affects loss. A positive derivative suggests decreasing that parameter; a negative one suggests increasing it. Gradient descent subtracts the learning rate η times the current gradient. η is positive, and a useful numerical magnitude depends on loss and parameter units.

θ(t+1)=θ(t)−η∇L(θ(t)),η>0\theta^{(t+1)}=\theta^{(t)}-\eta\nabla L\bigl(\theta^{(t)}\bigr),\qquad \eta>0

Every component of one update uses the same old model θ^(t). Updating the kernel and then recomputing a head gradient with the new kernel would define a different method. We preserve the old parameters and gradients, then update kernel, convolution bias, head and output bias together.

The name “descent” does not guarantee a decrease at every step size. A long step can cross a low point and climb the other side. ReLU boundaries and products across layers also make CNN objectives generally nonconvex. A successful finite calculation is not a global optimization proof.

We retain checkpoint zero: the initial model evaluated before an update. Eight updates give nine checkpoints numbered zero through eight. Distinguish the number of displayed evaluations from the number of actual updates.

학부Undergraduate

두 관측의 첫 갱신을 분수로 계산하기Calculate the first update on two observations

작은1×1 입력 두 개를 씁니다. 학습 행은 x=0,y=0과 x=1,y=1입니다. 초기 커널 K=1/2, 합성곱 절편1/10, 출력 가중치 h=1/2, 출력 절편1/10입니다. 두 응답1/10과3/5는 양수여서 모두 활성화됩니다. 초기 점수는3/20과2/5, 오차는3/20과−3/5입니다.

L0=12[(320)2+(−35)2]=153800=0.19125L_0=\frac12\left[\left(\frac3{20}\right)^2+\left(-\frac35\right)^2\right]=\frac{153}{800}=0.19125

평균 제곱손실은 N=2이므로 각 행의 출력 미분2e/N는 e와 같습니다. 커널 미분은 첫 행의 x=0에서0, 둘째 행에서(−3/5)(1/2)×1=−3/10입니다. 합성곱 절편은 두 오차의 합에1/2를 곱해−9/40입니다. 출력 가중치 미분은(3/20)(1/10)+(−3/5)(3/5)=−69/200이며 출력 절편 미분은−9/20입니다.

학습률η=1/5·벌점0의 동시 갱신
매개변수초기값평균 손실 미분갱신 뒤
커널 K1/2−3/1014/25
합성곱 절편1/10−9/4029/200
출력 가중치 h1/2−69/200569/1000
출력 절편1/10−9/2019/100

새 모형의 두 점수는54501/200000과118229/200000입니다. 새 평균 제곱오차는4828427721/40000000000≈0.120710693025로 줄었습니다. 이 한 단계에서는 감소했지만, 이 계산 하나가 모든 자료·보폭·초기값에서의 감소를 증명하는 것은 아닙니다. 실습의 반복 경로는 별도로 읽습니다.

Use two one-cell training inputs: x=0, y=0 and x=1, y=1. Initialize kernel K=1/2, convolution bias 1/10, head weight h=1/2 and output bias 1/10. Both preactivations, 1/10 and 3/5, are positive. Scores are 3/20 and 2/5, with errors 3/20 and −3/5.

L0=12[(320)2+(−35)2]=153800=0.19125L_0=\frac12\left[\left(\frac3{20}\right)^2+\left(-\frac35\right)^2\right]=\frac{153}{800}=0.19125

With N=2, each row’s score derivative 2 e/N equals e. The first row contributes zero to the kernel derivative because x=0; the second contributes (−3/5)(1/2)×1=−3/10. Convolution-bias derivative is −9/40, head derivative is (3/20)(1/10)+(−3/5)(3/5)=−69/200, and output-bias derivative is −9/20.

Simultaneous update at η=1/5 and no penalty
ParameterInitialMean-loss derivativeUpdated
Kernel K1/2−3/1014/25
Convolution bias1/10−9/4029/200
Head h1/2−69/200569/1000
Output bias1/10−9/2019/100

The updated scores are 54501/200000 and 118229/200000. Mean squared error becomes 4828427721/40000000000≈0.120710693025. This step decreases loss, but one calculation does not prove decrease for every dataset, rate or initialization. Read the subsequent training trajectory separately.

학부Undergraduate

규제화의 목적함수와 데이터 오차를 분리하기Separate the regularized objective from data error

큰 가중치를 꺼리는 L2 벌점을 더하면 목적함수는 데이터 평균 제곱오차와 벌점의 합입니다. 이 장은 커널 K와 출력 가중치 h에만 벌점을 주며 두 절편에는 주지 않습니다. 데이터 오차가 줄었는지와 가중치가 작아졌는지는 다른 항목이므로, 훈련 표에서 둘을 따로 보여 줍니다.

L(θ)=1N∑i(fθ(Xi)−yi)2+λ2(∥K∥F2+∥h∥22),λ≥0L(\theta)=\frac1N\sum_i\bigl(f_\theta(X_i)-y_i\bigr)^2+\frac\lambda2\left(\|K\|_F^2+\|h\|_2^2\right),\quad \lambda\ge0

평균 손실을 합 손실로 바꾸면서 같은 수치의 λ를 쓰면 자료 항과 벌점의 상대 크기가 달라집니다. 단위 비중의 N행에서는 같은 최적화 문제를 상수배로 표현하려면 합 손실의 벌점 계수도 N배 해야 합니다. 이 장의 훈련은 처음부터 평균 손실로 고정하며, 같은 λ를 유지한 채 행 수를 바꾸더라도 정의가 몰래 합 손실로 바뀌지 않습니다.

고정한 λ가 이 자료에 가장 좋은 규제 강도라는 보장은 없습니다. 실제로 작은 기본 예에서는 λ=1/5의8단계 데이터 오차가 λ=0보다 큽니다. 이는 규제화가 고장 났다는 증거도, 규제화가 언제나 나쁘다는 증거도 아닙니다. 유한 반복·모형·초기값·후보 선택 기준을 함께 적고, λ를 고른다면 검증 표에서 사전에 정한 절차로 비교합니다.

가중치 값의 의미에도 주의합니다. 양수 s에 대해 커널과 합성곱 절편을 s배 하고 출력 가중치를1/s배 하면 ReLU의 양의 동차성 때문에 같은 함수를 표현할 수 있습니다. 그럼에도 가중치 제곱합은 보통 달라집니다. 함수가 같다는 것과 매개변수·벌점이 같다는 것을 구분해야 하며, 학습된 한 커널의 숫자만으로 해석을 확정하지 않습니다.

An L2 penalty adds a preference against large weights to the mean squared data error. We penalize K and h but neither bias. Data fit and parameter size are different quantities, so the training table displays them separately.

L(θ)=1N∑i(fθ(Xi)−yi)2+λ2(∥K∥F2+∥h∥22),λ≥0L(\theta)=\frac1N\sum_i\bigl(f_\theta(X_i)-y_i\bigr)^2+\frac\lambda2\left(\|K\|_F^2+\|h\|_2^2\right),\quad \lambda\ge0

Changing a mean loss to a sum while retaining the same numerical λ changes the relative penalty. With N unit-weight rows, multiplying the whole objective by N also multiplies the sum-form penalty coefficient by N. Our implementation consistently uses mean loss; changing row count does not silently change that definition.

A specified λ need not be best for a dataset. In the small default example, eight-step data error at λ=1/5 exceeds that at λ=0. This proves neither a broken regularizer nor universal harm from regularization. State the finite training path and selection criterion. If λ is selected, compare prespecified choices using validation data.

Parameter values also have symmetries. For positive s, scaling the kernel and convolution bias by s while dividing the head by s preserves the function through ReLU’s positive homogeneity. The squared-weight penalty generally changes. Equal functions need not have equal parameter norms, so one learned kernel’s entries do not alone settle interpretation.

학부Undergraduate

전체 배치·미니배치·초기값 구분하기Distinguish full batches, minibatches and initialization

이 장의 실제 훈련은 한 번 갱신할 때 모든 훈련 행을 읽는 전체 배치 경사하강법입니다. 같은 초기값·행 순서·보폭·반복 수로 계산하면 숨겨진 난수 표본 추출이 없습니다. 초기 커널도 작은 유리수로 명시합니다. 이 결정적인 한 경로를 어떤 무작위 초기화 분포의 평균 성능처럼 해석하지 않습니다.

미니배치는 일부 행만으로 한 번의 기울기를 계산하는 다른 방법입니다. 고정된 매개변수에서 행을 균등하게 무작위 추출하는 적절한 조건이라면 표본 평균 기울기의 기대값이 전체 평균 기울기와 같습니다. 그러나 고정 순서로 묶은 배치에 그 무작위 표본 명제를 그대로 붙이면 안 됩니다. 매개변수가 매번 바뀌므로 한 epoch의 모든 갱신을 한 번의 전체 배치 갱신으로 합칠 수도 없습니다.

초기값0은 단순해 보이지만 곱으로 연결된 층에서 학습을 막을 수 있습니다. 앞 두 행 예에서 커널·합성곱 절편·출력 가중치를 모두0, 출력 절편을훈련 목표 평균1/2로 두면 점수는 항상1/2입니다. 선택한 ReLU 미분0과 출력 가중치0 때문에 커널·출력층 데이터 미분이0이고, 출력 절편 미분도 두 오차가 상쇄되어0입니다.

그 모형의 훈련 MSE는1/4이지만 더 좋은 모형 K=1,h=1,두 절편0은 훈련 두 행을 정확히 맞힙니다. 따라서 멈춘 경로는 전역 최적의 증거가 아닙니다. 실제 초기화는 원칙과 범위를 공개하고, 활성 비율·기울기 크기·단순 기준 모형을 함께 확인합니다. “재현된다”는 사실은 “좋은 모형이다”라는 평가를 대신하지 않습니다.

Actual training here is full-batch gradient descent: every training row contributes to each update. With fixed initialization, row order, rate and step count, there is no hidden random minibatch draw. Small rational initial weights are explicitly declared. One deterministic trajectory is not an average over a random initialization distribution.

Minibatches use a subset for each gradient. Under appropriate uniform random-sampling conditions at fixed parameters, the sample mean gradient is unbiased for the full mean. That sampling statement does not automatically apply to deterministic ordered batches. Parameters change between updates, so a full epoch of minibatch updates is not one full-batch update.

Zero initialization can stall multiplicative layers. In our two-row example, set kernel, convolution bias and head to zero, and output bias to the training mean 1/2. Predictions are constantly 1/2. The chosen zero ReLU derivative and zero head stop upstream gradients; opposing residuals also cancel the output-bias gradient.

Training MSE is 1/4, yet K=1, h=1 with both biases zero fits the two training rows exactly. Stalling therefore does not establish a global optimum. Disclose initialization and inspect active fractions, gradient size and a simple baseline. Reproducibility does not by itself establish model quality.

학부Undergraduate

검증은 선택에 쓰이고 시험은 남겨 두기Use validation for selection and reserve test outcomes

훈련 행은 기울기를 계산합니다. 검증 행은 어떤 반복 단계나 사전 후보를 남길지 고릅니다. 시험 행은 선택이 끝난 모형을 평가합니다. 세 역할은 이름표만 다르게 붙이는 것이 아니라 실제 계산 경로에서 분리해야 합니다. 검증 오차가 기울기에 직접 들어가지 않더라도 검증 표는 모형 선택에 이미 사용한 자료입니다.

실제 사례는 학습률1/20과1/5, 각각0~20단계의 검증 MSE를 비교합니다. 각 학습률에서 가장 작은 값을 처음 달성한 체크포인트를 고르고, 후보 사이에서도 가장 작은 값을 처음 달성한 후보를 남깁니다. 동일한0단계가 두 후보에 반복된다고 서로 독립된 두 초기 모형을 얻은 것은 아닙니다. 동률을 깰 기준도 미리 고정합니다.

목표는 검증의 데이터 MSE이며 벌점을 더한 훈련 목적함수와 다릅니다. 너무 복잡한 모형이 훈련 자료를 잘 외워도 검증 MSE가 나빠질 수 있습니다. 반대로 제한한 후보·표본에서 초기0단계가 선택될 수도 있습니다. 국가의3×3시차 격자 사례는 바로 그런 결과를 보여 줍니다. 향상되지 않았다는 사실을 숨기거나 시험 결과를 보고 후보를 바꾸지 않습니다.

원 손글씨 자료의 훈련 파일과 시험 파일은 서로 다른 작성자 집단으로 구성되었다는 설명이 있습니다. 그러나 작은 훈련·검증 분할에는 작성자 ID가 없어 두 역할의 작성자 독립성을 입증하지 못합니다. 동일한64칸 표가 겹치지 않는다는 점검은 유용하지만 사람·수집 상황·시간의 독립성을 증명하지 않습니다. 반복되는 검증 사용에도 선택 편향이 남을 수 있습니다.

Training rows determine gradients, validation rows choose checkpoints or prespecified candidates, and test rows evaluate the selected model. These roles must correspond to separate computation paths, not just labels. Validation data have already been used for selection even if they never supply a gradient.

Actual cases compare learning rates 1/20 and 1/5 at checkpoints zero through twenty. For each rate we retain its earliest strict validation-MSE minimum, then retain the earliest candidate attaining the lowest such value. Repeating the same initial checkpoint under two rates does not produce independent initial models. Prespecify tie handling.

Selection uses validation data MSE, not the penalized training objective. Good training fit can coexist with poor validation loss, and a restricted candidate set can select checkpoint zero. The constructed country time-raster case does so. Report no improvement rather than adjusting candidates after looking at test results.

The original handwriting training and test files are described as using different writer groups. Writer IDs are unavailable for our small train/validation split, so writer independence between those roles is not established. Disjoint observed pixel tables do not prove independent people, collection conditions or time. Repeated validation use can also induce selection bias.

학부Undergraduate

실습 C: 학습 경로와 초기값을 비교하기Lab C: compare training paths and initialization

훈련 행 (x,y)=(0,0),(1,1), 검증 행 (1/4,0),(3/4,1)을 각각1×1 입력 JSON으로 둡니다. 훈련 행의 role은 train, 검증 행은 validation이어야 하며 ID는 서로 다르게 둡니다. 초기 모형은 K=1/2,합성곱 절편1/10,h=1/2,출력 절편1/10,학습률1/5,8단계,λ0입니다.

0단계의 훈련 MSE0.19125와 검증 MSE0.24203125를 확인합니다.1단계 매개변수는14절의 분수 갱신과 대조하세요.8단계의 훈련 MSE는약0.0360545,검증 MSE는약0.119093입니다. 이 실습의 반복 계산은 binary64 근사이므로 전체 수치를 보더라도 분수 계산과 같은 수학적 정확성을 주장하지 않습니다.

단계를0으로 바꾸면 갱신하지 않고 초기 모형 하나를 평가합니다.8단계로 복원한 뒤 λ=1/5를 넣으면 데이터 오차와 벌점이 따로 바뀝니다. 이 후보의8단계 훈련 MSE는약0.0841117,검증 MSE는약0.156098입니다. 같은 반복 수에서 이 후보가 더 낫다고 단정할 수 없다는 것을 표로 읽습니다.

다음 실험 전 λ0을 복원하고 모형 전체를 {"kernel":[["0"]],"convBias":"0","head":["0"],"outputBias":"1/2"}로 바꿉니다. 모든 단계의 훈련·검증 MSE가1/4인지 확인합니다. 이어 모형 전체를 {"kernel":[["1"]],"convBias":"0","head":["1"],"outputBias":"0"}로 바꾸면 초기 훈련 MSE0,검증 MSE1/16입니다. 멈춘0초기값과 더 좋은 다른 매개변수를 직접 비교하는 실험입니다.

마지막에는 처음 초기 모형과 학습률1/5,8단계,λ0을 복원합니다. 한 검증 행의 role을 test로 바꾸면 계산이 거절되어야 합니다. 이 장의 훈련 API는 시험 행을 체크포인트 선택에 넣지 않습니다. “그림이 예뻐졌다”가 아니라 모형·역할·손실·선택 단계가 모두 같은 조건인지 확인하면서 비교하세요.

Use one-cell training pairs (0,0),(1,1) and validation pairs (1/4,0),(3/4,1). Their explicit roles are train and validation, with distinct IDs across splits. Initialize K=1/2, convolution bias 1/10, h=1/2 and output bias 1/10; use rate 1/5, eight steps and λ=0.

At checkpoint zero verify training MSE 0.19125 and validation MSE 0.24203125. Match the first update to Section 14. After eight updates, training MSE is about 0.0360545 and validation MSE about 0.119093. Iterative calculations use approximate binary64 arithmetic; displaying every digit does not make them rationally exact.

Set steps to zero to evaluate only initialization. Restore eight steps before setting λ=1/5. The eight-step data MSE becomes about 0.0841117 and validation MSE about 0.156098, while penalty is shown separately. These values do not establish that the regularized candidate is better at this finite iteration count.

Restore λ=0 and replace the whole model by {"kernel":[["0"]],"convBias":"0","head":["0"],"outputBias":"1/2"}. Both losses should stay at 1/4. Next use {"kernel":[["1"]],"convBias":"0","head":["1"],"outputBias":"0"}: initial training MSE is zero and validation MSE 1/16. A better parameter setting directly refutes a global-optimum interpretation of the stalled initialization.

Finally restore the original model, rate 1/5, eight steps and λ=0. Changing a validation row’s role to test should be rejected. The training API does not admit test rows for checkpoint choice. Compare matched models, roles, losses and selected steps rather than attractive curves alone.

학부Undergraduate

미분 검산은 어떤 질문인가What a gradient check actually asks

미분 식과 코드가 맞는지 확인하려면 매개변수 하나를 조금 늘린 손실과 조금 줄인 손실을 비교할 수 있습니다. 가운데 기울기를 양쪽 변화로 근사하는 중앙 차분입니다. 이 검사는 “현재 지점에서 특정 좌표를 바꾸었을 때 손실 변화가 계산한 미분과 맞는가”를 묻습니다. 모든 자료·모든 매개변수의 구현이 옳다는 전면 증명은 아닙니다.

Dh(j)L(θ)=L(θ+hej)−L(θ−hej)2h,h>0D_h^{(j)}L(\theta)=\frac{L(\theta+h e_j)-L(\theta-h e_j)}{2h},\qquad h>0

비교할 때는 같은 입력·정답·벌점·모형을 유지하고 매개변수 j 하나만 바꿉니다. 학습 중 난수 변환이나 서로 다른 배치를 사용해 두 손실을 계산하면 매개변수 변화와 다른 차이가 섞입니다. 이 장의 작은 미분 실습은 하나의 명시한 관측과 결정적인 연산을 쓰며, 기본 미분과 차분 값을 함께 보여 줍니다.

절대 차이는 두 값의 차이 크기입니다. 상대 차이는 값의 크기와 함께 읽습니다. 두 미분이 모두0이면0/0을 그대로 만들지 않고 둘 다0이라는 별도 상태로 기록합니다. 반대로 값이 작은데 상대 차이만 크다면 원 수치·절대 차이·활성 경계를 함께 확인해야 합니다. 숫자 하나의 통과 표시로 모든 원인을 판단하지 않습니다.

커널·합성곱 절편·출력 가중치·출력 절편에서 각각 좌표를 골라 보세요. 이 장의 매개변수 번호는 커널 행 순서, 합성곱 절편, 펼친 출력 가중치 순서, 출력 절편이며0부터 셉니다. 커널 좌표만 확인하면 출력층이나 절편의 오류를 놓칠 수 있습니다.

One way to check a derivative implementation is to increase one parameter slightly and decrease it slightly, then compare losses. This centered difference asks a local coordinate question at the current input and parameters. It is not a proof of correctness for every observation or parameter setting.

Dh(j)L(θ)=L(θ+hej)−L(θ−hej)2h,h>0D_h^{(j)}L(\theta)=\frac{L(\theta+h e_j)-L(\theta-h e_j)}{2h},\qquad h>0

Hold input, target, penalty and every other parameter fixed. Different random augmentations or batches would mix other changes into the comparison. Our diagnostic uses a stated observation and deterministic operations, displaying analytic and finite-difference values together.

Read absolute and relative differences together. When both derivatives are zero, record that state rather than forming an uninterpreted 0/0. A large relative error between tiny numbers needs the original values, absolute discrepancy and activation-region information. A single pass indicator cannot diagnose every cause.

Choose coordinates from the kernel, convolution bias, head and output bias. Zero-based parameter order is row-major kernel, convolution bias, row-major flattened head, then output bias. Checking only a kernel entry can miss head or bias errors.

학부Undergraduate

같은 활성 영역에서의 정확한 비교An exact comparison within one active region

ReLU의 양·음 상태가 바뀌지 않는 작은 구간을 생각합시다. 이 구간에서 나머지 매개변수를 고정하고 커널 한 값 또는 출력 가중치 한 값만 움직이면, 이 장의 단일 합성곱층 모형 점수는 그 좌표의 일차식입니다. 제곱손실과 L2 벌점은 그 한 좌표에 대한 이차식이 됩니다.

L(t)=at2+bt+c⟹L(t+h)−L(t−h)2h=2at+bL(t)=a t^2+b t+c\quad\Longrightarrow\quad\frac{L(t+h)-L(t-h)}{2h}=2at+b

따라서 정확한 유리수로 계산하고 ±h 사이에 활성 영역이 바뀌지 않으면, 이 작은 모형의 단일 좌표 중앙 차분은 해석 미분과 정확히 같습니다. 이는 모든 신경망·모든 방향에 대한 일반 결론이 아닙니다. 두 층의 매개변수를 동시에 움직이거나 비선형 손실·다른 활성함수를 쓰면 한 방향의 차수가 달라질 수 있습니다.

예를 들어 L(t)=(t−1)²,t=5/2라면 미분은3입니다. h=1/1000이든1/10이든 위 이차식 항등식으로 중앙 차분도3입니다. “h가0이 아니니 언제나 약간 틀려야 한다”는 생각과 “중앙 차분은 언제나 정확하다”는 생각이 모두 지나치다는 것을 보여 줍니다.

실제 계산기는 선택한 좌표마다 원점·양쪽 이동의 활성 마스크를 비교합니다. 마스크가 같다는 것은 이 유한 구간의 비교 조건을 확인하는 데 도움이 됩니다. 그것만으로 더 큰 영역의 변화나 모든 숨은 경로를 인증한 것은 아니므로, 결과를 현재 실험의 범위 안에서 읽습니다.

Consider an interval where every ReLU sign stays unchanged. Holding other parameters fixed, our single-convolution-layer score is affine in one kernel coordinate or one head coordinate. Its squared loss and L2 penalty are therefore quadratic in that coordinate.

L(t)=at2+bt+c⟹L(t+h)−L(t−h)2h=2at+bL(t)=a t^2+b t+c\quad\Longrightarrow\quad\frac{L(t+h)-L(t-h)}{2h}=2at+b

With exact rational arithmetic and unchanged activation regions between ±h, a one-coordinate centered difference in this small model equals its analytic derivative exactly. This is not a general result for every network or direction. Moving parameters in multiple layers simultaneously, or changing the activation/loss, can change the degree along a direction.

For L(t)=(t−1)² at t=5/2 the derivative is three. Centered differences at h=1/1000 and h=1/10 also equal three by the quadratic identity. Both “every nonzero step must introduce an error” and “centered differences are always exact” are overly broad.

The diagnostic compares activation masks at the center and the two perturbed points. Matching masks help establish the stated finite comparison condition. They do not certify every larger region or hidden implementation path. Interpret the result within the experiment performed.

학부Undergraduate

ReLU 꺾임을 넘으면 다른 비교가 된다Crossing a ReLU kink changes the comparison

f(b)=ReLU(b),목표1,벌점0인 한 칸 예를 다시 봅시다. b=0에서 이 장이 선택한 도함수는0입니다. 그러나 손실의 왼쪽 기울기는0,오른쪽 기울기는−2로 서로 다릅니다. h를 양·음으로 움직여 얻는 중앙 차분은 두 영역의 변화를 섞습니다.

(h−1)2−12h=−1+h2,h>0\frac{(h-1)^2-1}{2h}=-1+\frac h2,\qquad h>0

h=1/1000이면 중앙 차분은−1999/2000입니다. 선택한 해석 미분0과 다르지만, 이 차이만으로 ReLU 역전파 코드가 틀렸다고 결론 낼 수 없습니다. 검사는 매끈한 점을 가정했는데 실제로는 꺾임을 가로질렀기 때문입니다. 원점에서 도함수가 존재하지 않는다는 사실을 먼저 기록합니다.

반대로 꺾임이 없는 좌표에서 반복적으로 큰 차이가 나면 구현·정규화·벌점·매개변수 순서를 점검할 이유가 됩니다. 데이터 손실을 확인한 뒤 벌점 미분을 따로 확인하면 큰 규제 항이 데이터 미분 오류를 가리는 것을 줄일 수 있습니다. 크기가 작다는 이유만으로 미분을0으로 버리지는 않습니다.

한 좌표만 바꾸는 실습과 여러 매개변수를 동시에 바꾸는 학습도 구분하세요. 실제 갱신은 많은 좌표를 한 번에 움직이며 활성 영역을 바꿀 수 있습니다. 한 지점의 미분 검산이 통과했다고 다음 갱신의 손실 감소나 전체 훈련 경로의 안정성을 보장하지 않습니다.

Return to f(b)=ReLU(b), target one and no penalty. The chosen derivative at b=0 is zero, but the loss has left slope zero and right slope −2. A centered perturbation mixes the two regions.

(h−1)2−12h=−1+h2,h>0\frac{(h-1)^2-1}{2h}=-1+\frac h2,\qquad h>0

At h=1/1000 the centered difference is −1999/2000. Its disagreement with the chosen analytic value zero does not by itself establish a backpropagation bug. A smooth-point assumption was violated by crossing the kink. First record the absence of an ordinary derivative.

Persistent discrepancies away from kinks do motivate checks of implementation, normalization, penalties and parameter order. Check data and penalty contributions separately so a dominant regularizer does not hide a data-gradient error. Do not discard a derivative merely because it is small.

A coordinate diagnostic also differs from a training update that changes many parameters together and can cross activation boundaries. A successful local gradient check guarantees neither loss decrease on the next update nor stability of an entire training path.

학부Undergraduate

분수의 정확성·부동소수점의 소거를 구별하기Separate exact fractions from floating-point cancellation

유리수의 분자·분모를 보존하면1+ε와1−ε가 아주 가까워도 다른 값으로 남습니다. 유한 정밀도의 부동소수점에는 표현할 수 있는 간격이 있습니다. 충분히 작은 ε에서 두 수가 모두 같은 표시 값1로 반올림되면, 그 둘을 빼는 계산은0이 됩니다. 소수점을 많이 표시한다고 잃은 차이가 복구되지는 않습니다.

f(k)=k,목표0,k=1의 손실은 L(k)=k²입니다. h=1e-200에서 정확한 중앙 차분은2입니다. 그러나 양쪽 손실을 binary64로 각각 반올림하면 둘 다1이 되어 근사 차분은0일 수 있습니다. 이 장은 정확한 해석 미분·정확한 중앙 차분·손실을 투영한 근사 차분을 분리해 보여 줍니다.

(1+h)2−(1−h)22h=2,fl⁡((1+h)2)=fl⁡((1−h)2)=1  for sufficiently small h\frac{(1+h)^2-(1-h)^2}{2h}=2,\qquad \operatorname{fl}\bigl((1+h)^2\bigr)=\operatorname{fl}\bigl((1-h)^2\bigr)=1\ \text{ for sufficiently small }h

미분을 작은 h로 검산하면 항상 더 좋아진다는 규칙은 없습니다. 일반적인 매끈한 함수에서는 근사 절단 오차와 반올림·소거 오차를 함께 생각해야 합니다. 이 작은 모형의 정확한 유리수 비교는 계산의 구조를 확인하는 도구이며, 실제 반복 훈련은 binary64 근사입니다. 한 도구의 정확성을 다른 도구의 보장으로 옮기지 않습니다.

정확한 값이 수학적으로0인지,표시에만0으로 반올림되는지,표시 범위를 넘는지도 구분합니다. 예를 들어 1e-200의 제곱은 양의 1e-400입니다. 정확한 유리수 값은 보존할 수 있지만 binary64 제곱은0으로 내려갈 수 있습니다. 실제 훈련 계산은 그런 비영 곱의 표시 손실을 조용히0으로 진행하지 않고 계산 범위 오류로 알립니다.

Preserving a rational numerator and denominator keeps 1+ε distinct from 1−ε. Floating-point numbers have finite spacing. When both expressions round to the displayed number one, subtracting them produces zero. Printing more decimal places cannot restore the lost difference.

For f(k)=k, target zero and k=1, loss is L(k)=k². At h=1e-200 the exact centered difference is two. Projecting both neighboring losses to binary64 can round each to one and produce a numerical difference of zero. We show the analytic value, exact centered difference and projected-loss difference separately.

(1+h)2−(1−h)22h=2,fl⁡((1+h)2)=fl⁡((1−h)2)=1  for sufficiently small h\frac{(1+h)^2-(1-h)^2}{2h}=2,\qquad \operatorname{fl}\bigl((1+h)^2\bigr)=\operatorname{fl}\bigl((1-h)^2\bigr)=1\ \text{ for sufficiently small }h

Smaller h is not universally better. General smooth-function checks balance truncation error against roundoff and cancellation. The exact rational comparison here exposes calculation structure; iterative training still uses approximate binary64 arithmetic. Do not transfer one tool’s exactness to the other.

Distinguish a mathematical zero, a nonzero value rounded to zero and a finite value beyond display range. Squaring 1e-200 gives the positive rational 1e-400, though a binary64 product may underflow to zero. Numerical training reports an arithmetic-range error rather than silently continuing with such a lost nonzero product.

학부Undergraduate

오류를 찾을 때 작은 예와 비교 모형 사용하기Use small examples and controls to diagnose errors

큰 손글씨 표에서 최종 정답률만 보면 계산 오류와 어려운 학습 문제를 구분하기 어렵습니다. 먼저 한 칸·한 창·한 행으로 줄여 손계산이 가능한 예를 확인합니다. 그다음 여러 창의 공유 기울기,겹치는 입력의 경로,평균 손실의 N,벌점의 대상 순서로 복잡성을 늘립니다. 작은 예의 통과는 필요한 점검이지만 실제 큰 자료의 성공을 보장하지 않습니다.

관찰과 다음 질문
관찰먼저 점검할 것바로 결론 내리지 않을 것
모든 활성값0입력 단위·절편·초기 커널전체 문제가 최적화되었다
훈련 오차만 감소역할 분리·과적합·검증 절차새 자료에도 성능이 좋다
미분 차분만 불일치ReLU 영역·소거·벌점·정규화역전파가 반드시 틀렸다
실행 중 범위 오류비영 underflow·overflow·보폭관측값이0이거나 무한대다

같은 자료에 단순한 상수 모형도 둡니다. 훈련 목표 평균을 계속 예측하는 모형과 비교하면, 복잡한 CNN이 실제로 유용한 패턴을 배웠는지 묻기 쉽습니다. 훈련·검증·시험 평균을 각각 써서 기준값을 바꾸면 세 역할에서 다른 모형을 비교하게 됩니다. 기준 모형의 평균은 훈련에서만 구하고 그대로 유지합니다.

비활성 경로와 사용하지 않는 목적 항은 구분합니다. λ=0이면 가중치 벌점은 정의상0이며 계산할 필요가 없습니다. 거대한 가중치의 제곱을 불필요하게 계산하다가,값이0인 정상 평가까지 실패시키는 것은 올바른 진단이 아닙니다. 반대로 λ>0에서 실제 벌점 계산이 수치 범위를 넘으면 유한 정밀도 계산의 한계를 명시해야 합니다.

숫자 표와 그림을 함께 보세요. 결측·미정의·표시 손실 값을0으로 그리면 학습이 완벽해진 것처럼 보일 수 있습니다. 원 계수·현재 활성값·선택한 체크포인트·기준 모형을 이름과 단위가 있는 표에서 대조하고,그림은 같은 수치를 읽는 보조 도구로 사용합니다.

A final accuracy number on a large image table cannot distinguish an implementation error from difficult optimization. Begin with one cell, window and observation that can be checked by hand. Then add shared-window gradients, overlapping input paths, mean-loss normalization and penalty scope. Small tests are necessary checks, not guarantees of success on larger data.

An observation and the next question
ObservationCheck firstDo not immediately conclude
All activations zeroInput scale, biases and kernel initializationThe whole problem is optimized
Only training error fallsSplit isolation, overfitting and validation designNew-data performance is good
Derivative comparison disagreesReLU regions, cancellation, penalty and normalizationBackpropagation must be wrong
Arithmetic-range rejectionNonzero underflow, overflow or step sizeThe observed value is zero or infinite

Include a simple constant predictor using the training target mean. This makes it easier to ask whether the CNN learned something useful. Replacing the constant by separate train, validation and test means compares different models across roles. Estimate it on training targets only and retain it for all evaluations.

Distinguish inactive paths from unused objective terms. With λ=0 the penalty is identically zero, so an unused squared-weight norm need not be computed. Overflowing an irrelevant norm should not make an otherwise zero-loss evaluation fail. With positive λ, an actual penalty outside numerical range requires an explicit limitation.

Read numerical tables alongside plots. Drawing missing, undefined or undisplayable values as zero can make a failed calculation resemble perfect learning. Compare native counts, activations, selected checkpoint and baseline using labeled units; use the graph as another view of those same values.

학부Undergraduate

실습 D: 정확 차분·꺾임·소거를 분리하기Lab D: separate exact differences, kinks and cancellation

기본 입력 [[1,2],[3,4]],K=[[1]],합성곱 절편0,네 출력 가중치1/4,출력 절편0,목표1,λ0,h=1/1000을 씁니다. 비교 좌표는0,1,2,6으로 두어 커널·합성곱 절편·첫 출력 가중치·출력 절편을 확인합니다. 원점과 양쪽의 활성 영역이 같을 때 정확한 해석 미분과 정확한 중앙 차분이 같은지 확인하세요.

다음에는 입력 전체를 [[0]],모형 전체를 {"kernel":[["1"]],"convBias":"0","head":["1"],"outputBias":"0"},목표1,λ0,h=1/1000,좌표 [0,1,2,3]으로 바꿉니다. 합성곱 절편 좌표1에서 선택한 해석 미분0과 중앙 차분−1999/2000을 읽고 활성 영역 변화 표시를 확인합니다. 차이를 곧바로 버그라고 결론 내리지 않습니다.

같은1×1 모형에서 입력만 [[1]],목표0,h=1e-200으로 바꿉니다. 커널 좌표0의 정확 미분과 정확 차분은2이지만,손실을 binary64로 투영한 차분은0일 수 있습니다. 작은 보폭이 언제나 더 정확한 수치 검산을 만든다는 생각을 이 예와 비교하세요.

마지막에는 첫2×2 입력·완전한 기본 모형·목표1·λ0·h1/1000·좌표 [0,1,2,6]을 복원합니다. 존재하지 않는 매개변수 번호나 중복 좌표는 거절되어야 합니다. 이 실습은 선택한 지역의 계산을 확인하며,다음 실습에서는 고정한 모형을 새로운 역할의 자료에서 평가합니다.

Use the default input [[1,2],[3,4]], kernel [[1]], zero convolution bias, four head weights of 1/4, zero output bias, target one, λ=0 and h=1/1000. Indices [0,1,2,6] cover kernel, convolution bias, first head weight and output bias. Check exact analytic and centered differences when activation regions match.

Next replace the full input by [[0]] and the full model by {"kernel":[["1"]],"convBias":"0","head":["1"],"outputBias":"0"}, using target one, λ=0, h=1/1000 and indices [0,1,2,3]. At convolution-bias index one, compare chosen analytic zero with centered difference −1999/2000 and inspect the region-change flag. Disagreement here is not automatically a bug.

Keep the one-cell model but set input [[1]], target zero and h=1e-200. At kernel index zero the exact derivative and centered difference equal two, while the projected-loss difference can be zero. Compare this with the belief that a smaller step always yields a more accurate numerical check.

Finally restore the initial 2×2 input, complete original model, target one, λ=0, h=1/1000 and indices [0,1,2,6]. Out-of-range or duplicate parameter indices should be rejected. This lab checks selected local calculations; the next evaluates a fixed model on separately labeled data roles.

학부Undergraduate

정답률과 점수 오차는 서로 다른 표다Accuracy and score error describe different things

이진 목표0·1에 대해 점수1/4,3/4를 내고 문턱1/2로 분류하면 두 개 모두 맞힐 수 있습니다. 그래도 점수와 목표의 차이는 각각1/4,−1/4여서 MSE는1/16입니다. 정답률1이 손실0을 뜻하지 않습니다. 반대로 문턱 근처의 작은 점수 변화는 MSE를 조금만 바꾸면서 분류 결과를 바꿀 수 있습니다.

y^i=1{fθ(Xi)≥τ},Acc^=1n∑i1{y^i=yi},MSE^=1n∑i(fθ(Xi)−yi)2\widehat y_i=\mathbf1\{f_\theta(X_i)\ge\tau\},\quad \widehat{\rm Acc}=\frac1n\sum_i\mathbf1\{\widehat y_i=y_i\},\quad \widehat{\rm MSE}=\frac1n\sum_i(f_\theta(X_i)-y_i)^2

평가할 때는 이미 선택한 모형을 고정합니다. 문턱을 바꾸어 다른 결정을 읽는 것은 가능하지만 시험 성적을 보고 가장 좋은 문턱을 새로 고르면 시험 표가 선택 자료가 됩니다. 기본 실제 사례의 문턱1/2는 사전에 고정한 이진 점수 판정 규칙입니다. 현재 점수가 확률로 보정되었다는 가정을 추가하지 않습니다.

실제 손글씨 작은 시험 표에서 선택한 모형은32장 중31장을 맞힙니다.31/32는 계산한 결정에서 얻은 정확한 계수 비율이고,검증하지 않은 새 글자마다 성공할 확률이31/32라는 뜻은 아닙니다. 이 표는0·1을 같은 수로 선택한 작은 사례이며 작성자별 독립 관측이라는 가정도 자동으로 확보되지 않습니다.

평균 수치와 함께 틀린 원 그림을 읽습니다. 오류가 특정 모양·위치·계수 범위에 모여 있는지 확인하되,한 장의 오답으로 원인이나 편향을 단정하지 않습니다. 더 많은 자료가 필요하다는 결론도 학습 결과입니다. 화면은 원64개 계수·현재 모형 응답·관측 라벨·예측을 나란히 남깁니다.

Scores 1/4 and 3/4 for targets zero and one are both correct at threshold 1/2, yet their squared errors average to 1/16. Accuracy one does not mean zero loss. Conversely, a small score movement near a threshold can change a decision while barely changing MSE.

y^i=1{fθ(Xi)≥τ},Acc^=1n∑i1{y^i=yi},MSE^=1n∑i(fθ(Xi)−yi)2\widehat y_i=\mathbf1\{f_\theta(X_i)\ge\tau\},\quad \widehat{\rm Acc}=\frac1n\sum_i\mathbf1\{\widehat y_i=y_i\},\quad \widehat{\rm MSE}=\frac1n\sum_i(f_\theta(X_i)-y_i)^2

Hold the selected model fixed during evaluation. Reading decisions at a different threshold is possible, but choosing a threshold after inspecting test performance uses the test frame for selection. Actual binary cases prespecify threshold 1/2 without additionally asserting probability calibration.

The selected handwriting model correctly classifies 31 of 32 small-core test images. The count ratio 31/32 is exact for those computed decisions, not an established success probability on each new image. This is a small, purposefully balanced zero/one frame; independent observations by writer are not automatically established.

Read misclassified original images alongside averages. Inspect whether errors cluster by shape, location or count range, while avoiding causal conclusions from one mistake. Needing more evidence is a valid learning outcome. Native counts, model responses, observed labels and predictions remain available together.

학부Undergraduate

표본과 작성자·시간의 독립성을 구분하기Separate sample membership from writer and time independence

한 사람이 여러 숫자를 쓰면 그 사람의 필체가 여러 행에 반복됩니다. 무작위로 행을 섞어도 같은 작성자의 글자가 훈련과 검증 양쪽에 들어갈 수 있습니다. 작성자 ID가 있다면 사람 단위 분할을 검토할 수 있지만,없는 ID를 추정 없이 만들어 독립성을 주장해서는 안 됩니다.

원 optdigits 설명은30명의 원 훈련 작성자와 서로 다른13명의 원 시험 작성자를 구분합니다. 작은 사례의 훈련·검증은 원 훈련 파일 안에서 나누므로 작성자 독립성을 입증하지 못합니다. 원 시험 파일에서 고른32장은 원 설명의 별도 작성자 집단을 따르지만,그 안의32개 행이 서로 독립이라고 단정하는 것은 또 다른 문제입니다.

동일한64칸 벡터를 비교하면 정확히 같은 관측 표현이 역할 사이에 중복되는지 점검할 수 있습니다. 그러나 서로 다른 사람이 같은 계수 표를 만들 수도 있고,같은 사람이 서로 다른 표를 만들 수도 있습니다. 픽셀 표현의 중복과 사람의 중복은 같은 사건이 아닙니다. 원본을 삭제하지 않고 선택·제외 장부로 두 기준을 구분합니다.

경제 시계열에도 비슷한 경계가 있습니다. 인접한 예측 창은 여러 과거 연도를 공유하고,여러 국가는 같은 충격을 겪을 수 있습니다. 시간 순서로 훈련·검증·시험을 나누는 것은 미래 목표의 직접 사용을 줄이지만 독립 표본 정리를 자동으로 만들어 주지 않습니다. 새 발표 빈티지를 복원하지 않았다면 실시간 예측 검증이라고 부르지도 않습니다.

Several rows can repeat one writer’s style. Randomly shuffling rows can place that writer in both training and validation. Writer-level splitting is worth considering when IDs exist, but unavailable IDs must not be invented to assert independence.

The original optdigits description distinguishes 30 original training writers from 13 different test writers. Our small train/validation split lies within the training file and does not establish disjoint writers. The 32 selected test images come from the described separate writer group, but independence among those individual rows is an additional question.

Comparing 64-cell vectors detects identical observed representations across roles. Different writers can produce the same representation, and one writer can produce distinct ones. Pixel duplication and person duplication are different events. Preserve original files and record selection/exclusion criteria rather than deleting their history.

Economic time windows have related boundaries: adjacent examples share past years, and countries can share shocks. Chronological splitting reduces direct use of future targets but does not establish an independent-sample theorem. Without restored release vintages, the exercise is not a real-time forecasting validation.

학부Undergraduate

열 종류 분류로 넓힐 때 필요한 손실The loss needed for a ten-class extension

원 손글씨에는0~9가 모두 있습니다. 두 종류만 구분하는 선형 점수 하나로 열 종류를 분류할 수는 없습니다. 다중 분류로 확장하려면 마지막 층이 열 개의 로짓을 출력하고,각 라벨에 대응하는 목표를 정의해야 합니다. 다른 여덟 숫자를 모두0이라고 바꾸는 것은0·1 구별과 다른 문제입니다.

pj=exp⁡(sj−m)∑k=09exp⁡(sk−m),m=max⁡ksk,ℓ=log⁡ ⁣∑kexp⁡(sk)−syp_j=\frac{\exp(s_j-m)}{\sum_{k=0}^9\exp(s_k-m)},\quad m=\max_k s_k,\qquad \ell=\log\!\sum_k\exp(s_k)-s_y

Softmax는 로짓을 양수 확률로 정규화하는 모형 정의입니다. 최대 로짓 m을 빼도 분자·분모의 공통 배율이 상쇄되어 같은 확률을 얻고,큰 지수의 overflow를 줄일 수 있습니다. 교차엔트로피 미분은 각 로짓에 대해 p_j−1{j=y}입니다. 입력 블록의 계수0~16과 로짓·확률·관측 라벨은 서로 다른 층의 값입니다.

그러나 softmax 형식을 썼다는 사실만으로 외부 자료의 확률 보정이 입증되는 것은 아닙니다. 지수·로그의 유한 정밀도,작은 확률,역할 분리,평가 집단을 계속 확인해야 합니다. 정확한 유리수 손실·기울기와 같은 종류의 산술이라고 표시하지도 않습니다. 로그 손실을 구할 때 반올림된 확률0의 로그를 무심코 읽는 것도 피해야 합니다.

이 장의 실제 실행은 추적 가능한 이진 제곱손실 CNN입니다. 열 종류 확장은 별도 실험 설계로 다룹니다. 원 파일의 모든 라벨과64칸 계수를 보존했으므로,전체 클래스의 표본·역할·열 출력층·손실·기준 모형을 새로 명시해 확장할 수 있습니다. 이진 사례의31/32를 그 실험의 결과로 재사용하지 않습니다.

Original handwriting contains labels zero through nine. One scalar score trained only on zero versus one does not classify ten categories. A multiclass extension needs ten output logits and correctly defined targets. Mapping the other eight digits to zero changes the task.

pj=exp⁡(sj−m)∑k=09exp⁡(sk−m),m=max⁡ksk,ℓ=log⁡ ⁣∑kexp⁡(sk)−syp_j=\frac{\exp(s_j-m)}{\sum_{k=0}^9\exp(s_k-m)},\quad m=\max_k s_k,\qquad \ell=\log\!\sum_k\exp(s_k)-s_y

Softmax defines a normalized positive probability model. Subtracting the maximum logit cancels a common factor and reduces large-exponential overflow. Cross-entropy has logit derivative p_j−1{j=y}. Native counts, logits, probabilities and observed class labels belong to different stages.

A softmax form does not itself establish calibration on external data. Finite-precision exponentials/logarithms, tiny probabilities, split isolation and evaluation groups still matter. Do not label this arithmetic rationally exact. Nor should loss carelessly use the logarithm of a probability rounded to zero.

Our actual executed case is a traceable binary squared-loss CNN. Treat ten-class recognition as a separately specified extension, with its own sampling, roles, ten-output head, loss and baseline. All original labels and counts are retained for that purpose. The binary result 31/32 is not a result of the ten-class experiment.

학부Undergraduate

증강한 그림을 새 관측으로 부르지 않기Do not call augmented images new observations

그림을 조금 옮기거나 기울이는 증강은 모형이 어떤 변화에 견디길 바라는지에 관한 가정을 담습니다. 하지만 모든 변환이 라벨을 보존하지는 않습니다. 숫자6을 크게 돌리면9와 비슷해질 수 있고,가느다란1을 경계 밖으로 잘라내면 정보를 잃을 수 있습니다. 변환을 구현할 수 있다는 것과 그 변환이 과제에 정당하다는 것은 별개입니다.

8×8 계수 표를 한 칸 옮기는 것은 원32×32 비트맵에서 다시 글씨를 관측한 결과와 같지 않을 수 있습니다. 경계에서 값을 자르거나0을 더하는 규칙까지 기록해야 합니다. 계산으로 만든 표는 가상 변환이며,제공처가 새로 수집한 손글씨라고 표시하지 않습니다.

증강본은 원본과 같은 가족으로 관리해야 합니다. 원 그림의 일부 변형을 훈련에,다른 변형을 시험에 넣으면 원 정보가 역할 사이에 새어 들어갈 수 있습니다. 분할을 먼저 고정하고,훈련에 적용하는 변환과 평가용 스트레스 실험을 목적에 맞게 따로 설계합니다. 증강의 강도를 시험 정답으로 고르면 시험 선택 문제가 다시 생깁니다.

기울기 방향의 작은 변화나 훈련하지 않은 변환에서 성능을 읽는 것은 유용한 추가 질문입니다. 다만 몇 개 변환에서 잘 작동했다는 관측을 모든 가능한 공격·물리적 변화에 대한 인증으로 바꾸지 않습니다. 앞 강건성 장에서 명시한 모형·위협집합의 범위를 여기의 학습된 CNN에 자동으로 옮길 수도 없습니다.

Shifts or rotations encode assumptions about transformations a model should tolerate. Not every transformation preserves a label: a large rotation can make six resemble nine, and cropping a narrow one can remove its information. Implementability does not establish task validity.

Shifting an 8×8 count table need not reproduce a new observation of the original 32×32 bitmap. Record cropping and boundary-fill rules. A computed transformed array is hypothetical, not newly collected provider handwriting.

Keep augmentation families within their original data roles. Putting variants of one original into training and test can leak its information across splits. Fix splits first, then separately design training transforms and evaluation stress tests. Selecting transform strength by test labels reintroduces test-based selection.

Sensitivity to a gradient direction or an untrained transformation is useful evidence with a stated scope. Success on several transforms is not a certificate over every attack or physical change. Certificates from a different model and declared threat set do not automatically transfer to this trained CNN.

학부Undergraduate

재현 기록에 남겨야 할 숫자와 절차Record the numbers and procedure needed for replication

코드 파일만 남기면 재현에 필요한 정보가 충분하지 않을 수 있습니다. 어느 원 파일을 읽었는지,어떤 행이 어느 역할인지,카운트를 무엇으로 나누었는지,매개변수 순서와 초기값·학습률·벌점·반복 수·동률 규칙을 함께 남깁니다. 원 라벨과 모델이 만든 예측을 같은 열로 덮어쓰지 않습니다.

다시 계산할 때 필요한 기록
구분이 장의 예
원자료 식별파일별 SHA-256·현재 data-row·원 계수
목표·역할이진0/1 또는 연속 매출·훈련/검증/시험
모형valid커널·ReLU규칙·펼친 출력층·두 절편
훈련정해진 초기값·평균 손실·λ·학습률·갱신 수
선택검증 데이터 MSE·가장 이른 엄격한 최저점
수치 범위작은 분수 예와 binary64 반복을 구분

언어가 바뀌어도 입력과 원 관측은 바뀌지 않아야 합니다. 한국어와 영어에서 같은 파일·ID·계수·체크포인트를 대조합니다. 모바일의 읽기 쉬운 짧은 수치와 원래의 전체 값도 연결해 두어,보기 좋게 반올림한 값이 실제 선택에 쓰인 값처럼 섞이지 않도록 합니다.

Python과 R의 계산은 덧셈 순서·수치 라이브러리·그래픽 장치 때문에 마지막 자릿수가 다를 수 있습니다. 교차 구현의 허용 차이는 검산을 위한 규칙이며 수학적으로 인증된 바깥 오차 구간이 아닙니다. 후보를 고를 때는 반올림한 화면 값이나 임의의 허용오차로 동률을 새로 만들지 않습니다. 실제 계산값과 선택한 단계는 그대로 남깁니다.

재현할 수 있는 실패도 정보입니다. 정의하지 않은 입력 형태,없는 역할,수치 범위를 넘는 곱은 조용히 바꾸어 성공처럼 보이게 하지 않습니다. 학습자는 원 조건과 오류 이유를 읽고 유효한 비교를 다시 설계합니다. 프로그램을 실행했다는 사실·수학적 식의 정확성·자료의 적합성·사회적 사용 가능성은 각각 다른 검토 항목입니다.

Code alone may not specify a reproducible experiment. Record original-file identity, row roles, normalization constants, parameter order, initialization, learning rates, penalty, update count and tie rules. Do not overwrite native labels with model predictions.

Records needed to recalculate
CategoryExample here
Original identityFile SHA-256, current data row and native counts
Target and roleBinary 0/1 or continuous sales; train/validation/test
ModelValid kernel, ReLU convention, flattened head, two biases
TrainingInitialization, mean loss,λ, learning rate, updates
SelectionValidation data MSE, earliest strict minimum
Number scopeExact rational examples versus binary64 iteration

Language changes must preserve inputs and native observations. Match the same files, IDs, counts and checkpoints in Korean and English. Connect compact mobile-readable displays to complete original values so display rounding is not mistaken for the numbers used in selection.

Python and R can differ in last digits through summation order, libraries and graphics devices. A cross-implementation tolerance is a checking rule, not a certified outward mathematical interval. Do not create selection ties from rounded displays or an arbitrary tolerance. Retain the actual computed values and selected steps.

A reproducible failure is evidence too. Unsupported shapes, roles or numerical products should not silently change into successful-looking results. Read original conditions and the reason, then design a valid comparison. Execution, mathematical correctness, data suitability and acceptability of use are separate questions.

학부Undergraduate

실습 E: 고정한 모형의 평가만 바꾸어 보기Lab E: evaluate a fixed model without training it

입력1×1,커널1,합성곱 절편0,출력 가중치1,출력 절편0의 모형을 고정합니다. 평가 행은 입력1/4·목표0과 입력3/4·목표1이며 role은 test로 둡니다. 이진 과제와 문턱1/2에서 정답률1,MSE1/16인지 확인합니다. 이 화면은 가중치를 갱신하거나 검증 후보를 고르지 않습니다.

문턱만1로 바꾸면 두 행 모두0으로 분류해 정답률1/2이지만 MSE는1/16으로 같습니다. 문턱을0으로 바꾸면 둘 다1로 분류하고 정답률은 다시1/2입니다. 예측 점수와 정답이 같다면 문턱 변경은 점수 오차를 바꾸지 않는다는 점을 확인합니다. 시험 정답을 보고 가장 좋은 문턱을 고르는 공식 절차로 해석하지는 않습니다.

문턱1/2로 복원한 뒤 과제를 regression으로 바꿉니다. MSE는 그대로이고 이진 혼동표는 표시하지 않습니다. 선형 모형과 입력은 같아도 어떤 결과를 평가 지표로 읽는지 달라집니다. 다시 binary로 복원하고 실제 목표를1/2로 바꾸면 이진 라벨 조건에 맞지 않아 거절되어야 합니다. 원 목표0·1로 복원하세요.

마지막으로 별도의 가상 행 입력2·목표1을 평가해 보세요. 현재 모형의 점수2는 문턱1/2에서 라벨1로 맞지만 제곱오차는1입니다. 정답 라벨이 맞는 것·점수가 목표에 가까운 것·점수가 확률인 것은 다른 주장입니다. 실제 자료 실습에서는 고정한 역할과 전체 원 행을 함께 읽습니다.

Fix a one-cell model with kernel one, both biases zero and head one. Evaluation rows have input 1/4, target zero and input 3/4, target one, both labeled test. At binary threshold 1/2, verify accuracy one and MSE 1/16. This view neither updates weights nor selects validation candidates.

Changing only threshold to one predicts zero for both rows: accuracy becomes 1/2 while MSE stays 1/16. Threshold zero predicts one for both and again gives accuracy 1/2. Decisions change but fixed scores and targets do not. This comparison is not a license to tune a final threshold using test labels.

Restore threshold 1/2 and switch to regression. MSE remains unchanged while binary confusion counts are omitted. Restore binary; a target of 1/2 should now be rejected because it is not a binary label. Restore targets zero and one afterward.

Finally evaluate a separately stipulated row with input two and target one. The fixed model’s score two yields the correct binary label at threshold 1/2 but squared error one. A correct label, a score close to its target and a probability are different claims. The actual-data lab keeps roles and original observations visible alongside such metrics.

학부Undergraduate

국가 사례: 시차를 정사각형으로 접어도 되는가Country case: should time lags be folded into a square?

독일·일본·한국·미국의 보존된 연간 GDP 성장률을 읽습니다. 현재 연도의 성장률이0이상인지 예측하는 가상 이진 과제이며,직전9년 성장률만 입력합니다. 각 값을 (성장률+30)/60으로 바꾸고 오래된 순서대로3×3에 놓습니다. 이 행렬은 실제 지리·위성 사진이 아니라 분석자가 구성한 시간 격자입니다.

1989~2024년의 네 나라로144개 예를 만듭니다.1989~2007년76행은 훈련,2008~2014년28행은 검증,2015~2024년40행은 시험입니다. 입력은 각 목표 연도 이전의 관측만 사용하지만 원 값은 같은2026-10-08 보존 빈티지입니다. 발표 시차와 과거 수정 빈티지를 되살린 실시간 검증은 아닙니다.

이3×3 표에2×2 커널을 공유한다는 가정은 의도적으로 따져 볼 대상입니다. 좌우 이웃은1년,위아래 이웃은3년 차이를 뜻합니다. 작은 CNN을 실행할 수는 있지만 시간의 이웃 관계를 자연스럽게 표현했는지 물어야 합니다. 손글씨에서 유용한 공간 공유를 경제 표에 옮겼다는 이유만으로 적합성을 인정하지 않습니다.

기본 두 학습률·20단계에서 검증은0단계를 선택합니다. 시험 정답률은4/5이지만 훈련 목표 평균17/19를 항상 내는 단순 기준도4/5입니다. CNN 시험 MSE약0.169025는 상수 기준약0.168975보다 약간 큽니다. 복잡한 경로가 이 비교에서 개선을 보여 주지 않았다는 결과를 그대로 남깁니다. 경제 현상에 관한 인과 설명이나 정책 권고로 바꾸지 않습니다.

국가 · 성장률 격자와 구조 선택

관측한 자료는 네 나라의 연간 GDP 성장률입니다. 9개 과거 연도를 3×3으로 접은 격자는 수업에서 만든 표현이며 지리 영상이 아닙니다. 좌우 이웃은 1년, 위아래 이웃은 3년을 뜻하며 연속한 두 해가 행 경계에서는 공간 이웃이 되지 않는다는 점부터 검토하세요. 모형이 작동한다는 사실과 구조가 적절하다는 주장은 다릅니다.

원 관측과 선언한 CNN을 구분
항목내용
입력 형태3×3
공유 필터2×2
함께 학습하는 부분공유 필터·편향 + 공간별 선형 출력·편향
손실평균 MSE + 편향을 제외한 가중치의 λ/2 L2 · λ=1/1000
선택학습률 1/20·1/5, 0~20단계의 엄격한 검증 최솟값
수치 범위학습값은 유한 부동소수 근사 · 정확도는 계산된 판정의 행 수 비율
역할별 고정 분모
역할행 수
train76
validation28
test40
학습률별 검증으로 고른 시점
후보학습률단계검증 MSE최종 선택 1
01/200≈0.152028
저장값0.15202826934310812
1
11/50≈0.152028
저장값0.15202826934310812
0

검증은 갱신 전인 0단계를 골랐습니다. 시험 정확도는 CNN과 훈련 평균 기준선 모두 4/5이고, MSE는 기준선이 조금 더 작습니다. 성장 비음수라는 다수 범주만 맞추는 성능을 정책 예측의 성공으로 해석하지 않습니다. 같은 최종 빈티지의 과거 값을 썼으며 발표 시차와 수정 이력을 복원한 실시간 검증이 아닙니다.

같은 시험 행에서 비교
비교 모형시험 수MSE정확도TPFPTNFN
작은 CNN40≈0.169025
저장값0.16902458997250758
4/532800
훈련 표적 평균40≈0.168975
저장값0.16897506925207756
4/532800
선택 학습률의 전체 훈련·검증 곡선
선택 학습률의 전체 훈련·검증 곡선

원 벡터 확대 · 그림의 전체 좌표 CSV

시험 실제값과 CNN 점수 · 확률 보정 주장 없음
시험 실제값과 CNN 점수 · 확률 보정 주장 없음

원 벡터 확대 · 그림의 전체 좌표 CSV

실제 원수치·학습한 활성값·공유 필터
실제 원수치·학습한 활성값·공유 필터

원 벡터 확대 · 그림의 전체 좌표 CSV

예시 행의 원 관측과 계산을 구분
필드값
예시 IDDEU:2015
현재 파일actual360-four-country-growth-CPI-1980-2024.csv
현재 파일의 1기준 data-row251
관측 표적 원토큰1.66300602334775
역할test
CNN 점수 · 근사0.8947691002690239
추론 범위과거 9개 연도 성장률로 당해 성장률의 비음수를 분류 · 인과효과·실시간 검증 아님
원 입력 격자 · 데이터의 어휘 토큰 그대로
행/열012
03.866682415232092.88911741380250.887902330743628
1-5.544554519206744.134637785227583.75796884489337
20.4635120367092040.3969955837791452.18018602168017
선택된 CNN 활성 격자 · 근사
행/열01
0≈0.117985
저장값0.11798455831810276
≈0.103432
저장값0.1034316197637835
1≈0.0887084
저장값0.088708443823547617
≈0.101971
저장값0.10197105582743589
학습한 필터 격자 · 근사
행/열01
0≈0.05
저장값0.050000000000000003
≈-0.1
저장값-0.10000000000000001
1≈-0.1
저장값-0.10000000000000001
≈0.15
저장값0.14999999999999999

행과 열은 0부터 셉니다. 저장값 펼치기는 부동소수 출력의 전체 자릿수를 보여주며, 학습한 모수가 수학적으로 정확하다는 뜻이 아닙니다. 모바일 실습에서는 원수치·활성값·필터를 각각 골라 읽을 수 있습니다.

원자료·역할 계보·전체 255개 예측·학습 이력·모수: actual360-four-country-growth-CPI-1980-2024.csv · native-cnn-frame-lineage.csv · native5620-pixel-role-ledger.csv · core-native-inputs.csv · core-cnn-predictions.csv · learning-curve.csv · selected-model-parameters.csv · role-summary.csv · selected-activation-values.csv · selected-native-grid.csv · selected-kernel-values.csv

Python · R · 자료·변환 범위

Read retained annual GDP growth for Germany, Japan, Korea and the United States. The stipulated binary target indicates nonnegative current-year growth, using only nine prior annual growth values. Transform each by (growth+30)/60 and arrange oldest first in a 3×3 table. This is a constructed time raster, not an observed geographic or satellite image.

Four countries over 1989–2024 give 144 examples: 76 training rows through 2007, 28 validation rows for 2008–2014 and 40 test rows for 2015–2024. Inputs precede their target year but share the retained 2026-10-08 vintage. Release delays and historical revisions are not restored.

Sharing a 2×2 kernel is deliberately open to criticism: horizontal neighbors are one year apart and vertical neighbors three years apart. Running a CNN does not establish that the chosen neighborhoods represent time appropriately. A useful handwriting bias does not automatically transfer to an economic table.

Under the two default rates and twenty updates, validation selects checkpoint zero. Test accuracy is 4/5, as is the constant training-mean baseline 17/19. CNN test MSE is about 0.169025, slightly above the baseline’s 0.168975. Report no improvement in this comparison rather than turning a complicated path into causal explanation or policy advice.

Country · growth raster and architectural assumptions

The observations are annual GDP growth for four countries. Folding nine previous years into a 3×3 grid is a teaching construction, not a geographic image. Question the economic meaning of the artificial row boundaries before trusting spatial weight sharing. Executable computation does not establish a suitable inductive bias.

Separate observations from the declared CNN
ItemContent
Input shape3×3
Shared kernel2×2
Jointly learned componentsShared kernel/bias and spatial linear head/bias
LossMean MSE + λ/2 L2 on non-bias weights · λ=1/1000
SelectionStrict validation minimum over rates 1/20 and 1/5, checkpoints 0–20
Number scopeLearned values are finite floating approximations; accuracy is an exact ratio of computed decisions
Frozen role denominators
RoleRows
train76
validation28
test40
Validation-selected checkpoint for each rate
CandidateRateStepValidation MSEFinal selection: 1
01/200≈0.152028
Stored value0.15202826934310812
1
11/50≈0.152028
Stored value0.15202826934310812
0

Validation selected checkpoint 0, before any update. CNN and training-mean baseline both achieve test accuracy 4/5, while the baseline has slightly lower MSE. Predicting the common nonnegative-growth class does not establish useful policy forecasting. The common retained vintage does not reconstruct release delays or historical revisions.

Compare on the same test rows
ComparatorTest rowsMSEAccuracyTPFPTNFN
Tiny CNN40≈0.169025
Stored value0.16902458997250758
4/532800
Training-target mean40≈0.168975
Stored value0.16897506925207756
4/532800
Complete training/validation curve for the selected rate
Complete training/validation curve for the selected rate

Enlarge original vector · Complete figure coordinates CSV

Observed test targets and CNN scores · no calibration claim
Observed test targets and CNN scores · no calibration claim

Enlarge original vector · Complete figure coordinates CSV

Observed native values, learned activations and shared kernel
Observed native values, learned activations and shared kernel

Enlarge original vector · Complete figure coordinates CSV

Separate native observation and calculation for the illustration
FieldValue
Illustration IDDEU:2015
Current native fileactual360-four-country-growth-CPI-1980-2024.csv
One-based data row in current file251
Observed target token1.66300602334775
Roletest
Approximate CNN score0.8947691002690239
Inference scopeClassify nonnegative current growth using nine previous annual growth rates; not causal or real-time evaluation.
Native input grid · original lexical tokens
Row/column012
03.866682415232092.88911741380250.887902330743628
1-5.544554519206744.134637785227583.75796884489337
20.4635120367092040.3969955837791452.18018602168017
Selected CNN activation grid · approximate
Row/column01
0≈0.117985
Stored value0.11798455831810276
≈0.103432
Stored value0.1034316197637835
1≈0.0887084
Stored value0.088708443823547617
≈0.101971
Stored value0.10197105582743589
Learned kernel grid · approximate
Row/column01
0≈0.05
Stored value0.050000000000000003
≈-0.1
Stored value-0.10000000000000001
1≈-0.1
Stored value-0.10000000000000001
≈0.15
Stored value0.14999999999999999

Rows and columns are zero-based. Stored-value disclosures preserve full floating output digits; they do not certify exact learned parameters. Mobile readers can inspect native values, activations and the kernel separately in the lab.

Original data, role lineage, all 255 predictions, training traces and parameters: actual360-four-country-growth-CPI-1980-2024.csv · native-cnn-frame-lineage.csv · native5620-pixel-role-ledger.csv · core-native-inputs.csv · core-cnn-predictions.csv · learning-curve.csv · selected-model-parameters.csv · role-summary.csv · selected-activation-values.csv · selected-native-grid.csv · selected-kernel-values.csv

Python · R · Data and transformation scope

학부Undergraduate

개인 사례: 원 손글씨·활성 맵·오답을 함께 읽기Person case: inspect native handwriting, activations and an error

실제0·1 손글씨96장을 씁니다. 원 훈련 파일에서 각 클래스32장을 고르고 선택 순서의 네 번째마다 검증으로 보내48장 훈련·16장 검증으로 나눕니다. 원 시험 파일에서는 클래스마다16장씩32장을 읽습니다. 선택 전 전체 원 계수의 중복·라벨 모호성을 점검하고,원본 자체는 삭제하지 않은 채 선택·제외 장부를 남깁니다.

입력은 실제8×8 블록 계수를16으로 나눈 표입니다.3×3 커널 하나와 합성곱 절편이6×6 응답을 만들고,ReLU와36개 위치별 출력 가중치·출력 절편을 학습합니다.47개 매개변수 모두의 정의를 확인할 수 있습니다. 커널·출력층을 함께 갱신하며 훈련 목표 평균1/2만 내는 기준 모형도 같은 시험 표에서 비교합니다.

기본 검증은 학습률1/5의16단계를 선택합니다.32장 중31장이 맞아 정답률31/32,시험 MSE는약0.0357314입니다. 상수 기준의 정답률은1/2,MSE는1/4입니다. 이는 이 작은 두 클래스 표의 결과이며 전체0~9 성적·실무 인식률·각 작성자에 대한 보장을 뜻하지 않습니다.

한 오답 optdigits.tes:1309는 원 라벨1이고 계산 점수는약0.470089여서 문턱1/2에서0으로 분류됩니다. 원64개 계수와 실제 글자 모양,선택한 모형의 활성 맵을 읽어 보세요. 이 오답은 모든 숫자1의 대표 표본으로 고른 것이 아니라 평가 뒤 살펴보는 구체적인 오류 사례입니다. 오답을 보고 모형을 새로 고르면 또 다른 검증 절차가 필요합니다.

개인 · 실제 손글씨의 오답을 끝까지 추적

원 8×8 수치는 32×32 손글씨 비트맵을 4×4 블록으로 나누어 켜진 점을 센 0~16의 정수입니다. 아래 그림은 실제 원수치의 재구성이며 새로 만든 필기 이미지가 아닙니다. 0과 1만 골라 균형을 맞춘 96개 수업 표본이고, 원 5,620개·10범주 관측 전체도 내려받을 수 있습니다.

원 관측과 선언한 CNN을 구분
항목내용
입력 형태8×8
공유 필터3×3
함께 학습하는 부분공유 필터·편향 + 공간별 선형 출력·편향
손실평균 MSE + 편향을 제외한 가중치의 λ/2 L2 · λ=1/1000
선택학습률 1/20·1/5, 0~20단계의 엄격한 검증 최솟값
수치 범위학습값은 유한 부동소수 근사 · 정확도는 계산된 판정의 행 수 비율
역할별 고정 분모
역할행 수
train48
validation16
test32
학습률별 검증으로 고른 시점
후보학습률단계검증 MSE최종 선택 1
01/2020≈0.173165
저장값0.17316480735790918
0
11/516≈0.00800939
저장값0.0080093851572792373
1

시험 32개 중 31개를 맞췄습니다. 아래는 틀린 실제 1 한 개(optdigits.tes:1309)를 사후 설명용으로 골랐습니다. 점수 약 0.47009가 선언한 문턱 0.5 아래여서 0으로 분류됐습니다. 이 오답으로 모형을 다시 고르지 않았고, 잘못한 한 그림이 모든 필기자의 오차를 대표하지 않습니다. 원 훈련·시험 필기자는 다르지만 훈련 안의 검증 분할에는 필기자 ID가 없어 독립성을 보장하지 않습니다.

같은 시험 행에서 비교
비교 모형시험 수MSE정확도TPFPTNFN
작은 CNN32≈0.0357314
저장값0.035731422685194726
31/32150161
훈련 표적 평균32≈0.251/2161600
선택 학습률의 전체 훈련·검증 곡선
선택 학습률의 전체 훈련·검증 곡선

원 벡터 확대 · 그림의 전체 좌표 CSV

시험 실제값과 CNN 점수 · 확률 보정 주장 없음
시험 실제값과 CNN 점수 · 확률 보정 주장 없음

원 벡터 확대 · 그림의 전체 좌표 CSV

실제 원수치·학습한 활성값·공유 필터
실제 원수치·학습한 활성값·공유 필터

원 벡터 확대 · 그림의 전체 좌표 CSV

예시 행의 원 관측과 계산을 구분
필드값
예시 IDoptdigits.tes:1309
현재 파일optdigits.tes
현재 파일의 1기준 data-row1309
관측 표적 원토큰1
역할test
CNN 점수 · 근사0.47008850692374315
추론 범위실제 손글씨 0/1의 이진 분류 · 원 10범주 전체 평가 아님
원 입력 격자 · 데이터의 어휘 토큰 그대로
행/열01234567
0000051510
10000111610
20008151630
302131551600
40814231600
5000041500
6000051500
7000051610
선택된 CNN 활성 격자 · 근사
행/열012345
0≈0.211833
저장값0.21183305850862708
≈0.442112
저장값0.44211175981685003
≈0.597052
저장값0.59705202059424523
≈0.75067
저장값0.75067003257922615
≈0≈0
1≈0.549937
저장값0.549937025926995
≈0.417086
저장값0.41708611940461099
≈0.40568
저장값0.40568027032663073
≈0.848089
저장값0.84808858009052046
≈0≈0.0279108
저장값0.027910781292339315
2≈0.478014
저장값0.47801413349867916
≈0.251896
저장값0.2518960733237115
≈0.46431
저장값0.46430970035840913
≈0.615685
저장값0.61568464152838809
≈0≈0
3≈0.4927
저장값0.49270043493998927
≈0.358835
저장값0.35883502109359072
≈0.0780205
저장값0.078020542257355746
≈0.782492
저장값0.78249204319339172
≈0≈0.0163311
저장값0.016331119251559223
4≈0.423963
저장값0.42396250079279518
≈0.105318
저장값0.10531802512703715
≈0.349491
저장값0.3494907615489562
≈0.858327
저장값0.85832682351514134
≈0≈0.0296299
저장값0.029629927069043216
5≈0.211833
저장값0.21183305850862708
≈0.211833
저장값0.21183305850862708
≈0.434778
저장값0.4347779418163229
≈0.870628
저장값0.87062796885714577
≈0≈0.0198937
저장값0.019893700888470783
학습한 필터 격자 · 근사
행/열012
0≈-0.0554423
저장값-0.05544234220642303
≈-0.135766
저장값-0.13576648501916747
≈0.320014
저장값0.32001449690714501
1≈-0.212781
저장값-0.21278092507974408
≈0.0811572
저장값0.081157220369092106
≈-0.00314537
저장값-0.0031453735575351343
2≈0.0775694
저장값0.077569416564372551
≈-0.288791
저장값-0.28879137765995455
≈0.460557
저장값0.46055740261644584

행과 열은 0부터 셉니다. 저장값 펼치기는 부동소수 출력의 전체 자릿수를 보여주며, 학습한 모수가 수학적으로 정확하다는 뜻이 아닙니다. 모바일 실습에서는 원수치·활성값·필터를 각각 골라 읽을 수 있습니다.

원자료·역할 계보·전체 255개 예측·학습 이력·모수: optdigits.tra · optdigits.tes · optdigits.names · optdigits-orig.names · native-cnn-frame-lineage.csv · native5620-pixel-role-ledger.csv · core-native-inputs.csv · core-cnn-predictions.csv · learning-curve.csv · selected-model-parameters.csv · role-summary.csv · selected-activation-values.csv · selected-native-grid.csv · selected-kernel-values.csv

Python · R · 자료·변환 범위

UCI · Alpaydin / Kaynak 1998 · DOI 10.24432/C50P49 · CC BY 4.0

Use 96 observed zero/one images. Select 32 per class from the original training file and allocate every fourth selected position to validation, giving 48 training and 16 validation images. Select 16 per class from the original test file, giving 32 test images. Audit pixel identity and ambiguous labels while preserving all original files and an explicit selection ledger.

Inputs are observed 8×8 block counts divided by sixteen. One trainable 3×3 kernel and bias produce 6×6 responses, followed by ReLU, 36 spatial head weights and an output bias. All 47 parameters are defined and both layers learn. A constant training-mean baseline of 1/2 is evaluated on the same test frame.

Default validation selects step sixteen at learning rate 1/5. Test accuracy is 31/32 and MSE about 0.0357314; the constant baseline has accuracy 1/2 and MSE 1/4. These describe this small two-class frame, not ten-class performance, production recognition or a guarantee for every writer.

Misclassified observation optdigits.tes:1309 has native label one and computed score about 0.470089, so threshold 1/2 predicts zero. Inspect its 64 original counts, image and selected-model activation map. This is a post-evaluation error illustration, not a representative sample of all ones. Using it to retune a model would require a new validation procedure.

Person · follow an actual handwriting error

Each native 8×8 entry counts active pixels in a 4×4 block of a 32×32 handwriting bitmap. The displayed grid reconstructs these actual counts; it is not generated handwriting. The 96-image teaching core purposefully balances classes 0 and 1; all 5,620 original observations and ten classes remain downloadable.

Separate observations from the declared CNN
ItemContent
Input shape8×8
Shared kernel3×3
Jointly learned componentsShared kernel/bias and spatial linear head/bias
LossMean MSE + λ/2 L2 on non-bias weights · λ=1/1000
SelectionStrict validation minimum over rates 1/20 and 1/5, checkpoints 0–20
Number scopeLearned values are finite floating approximations; accuracy is an exact ratio of computed decisions
Frozen role denominators
RoleRows
train48
validation16
test32
Validation-selected checkpoint for each rate
CandidateRateStepValidation MSEFinal selection: 1
01/2020≈0.173165
Stored value0.17316480735790918
0
11/516≈0.00800939
Stored value0.0080093851572792373
1

The model correctly classifies 31 of 32 test images. The actual digit 1 shown below, optdigits.tes:1309, is the sole test error and was selected afterward for explanation. Its score near 0.47009 falls below the declared 0.5 cutoff. It did not influence model selection and does not represent every writer. Original train/test writers differ, but writer IDs are unavailable for the internal train/validation split.

Compare on the same test rows
ComparatorTest rowsMSEAccuracyTPFPTNFN
Tiny CNN32≈0.0357314
Stored value0.035731422685194726
31/32150161
Training-target mean32≈0.251/2161600
Complete training/validation curve for the selected rate
Complete training/validation curve for the selected rate

Enlarge original vector · Complete figure coordinates CSV

Observed test targets and CNN scores · no calibration claim
Observed test targets and CNN scores · no calibration claim

Enlarge original vector · Complete figure coordinates CSV

Observed native values, learned activations and shared kernel
Observed native values, learned activations and shared kernel

Enlarge original vector · Complete figure coordinates CSV

Separate native observation and calculation for the illustration
FieldValue
Illustration IDoptdigits.tes:1309
Current native fileoptdigits.tes
One-based data row in current file1309
Observed target token1
Roletest
Approximate CNN score0.47008850692374315
Inference scopeBinary classification of actual handwritten digits 0 and 1; not an evaluation of all ten native classes.
Native input grid · original lexical tokens
Row/column01234567
0000051510
10000111610
20008151630
302131551600
40814231600
5000041500
6000051500
7000051610
Selected CNN activation grid · approximate
Row/column012345
0≈0.211833
Stored value0.21183305850862708
≈0.442112
Stored value0.44211175981685003
≈0.597052
Stored value0.59705202059424523
≈0.75067
Stored value0.75067003257922615
≈0≈0
1≈0.549937
Stored value0.549937025926995
≈0.417086
Stored value0.41708611940461099
≈0.40568
Stored value0.40568027032663073
≈0.848089
Stored value0.84808858009052046
≈0≈0.0279108
Stored value0.027910781292339315
2≈0.478014
Stored value0.47801413349867916
≈0.251896
Stored value0.2518960733237115
≈0.46431
Stored value0.46430970035840913
≈0.615685
Stored value0.61568464152838809
≈0≈0
3≈0.4927
Stored value0.49270043493998927
≈0.358835
Stored value0.35883502109359072
≈0.0780205
Stored value0.078020542257355746
≈0.782492
Stored value0.78249204319339172
≈0≈0.0163311
Stored value0.016331119251559223
4≈0.423963
Stored value0.42396250079279518
≈0.105318
Stored value0.10531802512703715
≈0.349491
Stored value0.3494907615489562
≈0.858327
Stored value0.85832682351514134
≈0≈0.0296299
Stored value0.029629927069043216
5≈0.211833
Stored value0.21183305850862708
≈0.211833
Stored value0.21183305850862708
≈0.434778
Stored value0.4347779418163229
≈0.870628
Stored value0.87062796885714577
≈0≈0.0198937
Stored value0.019893700888470783
Learned kernel grid · approximate
Row/column012
0≈-0.0554423
Stored value-0.05544234220642303
≈-0.135766
Stored value-0.13576648501916747
≈0.320014
Stored value0.32001449690714501
1≈-0.212781
Stored value-0.21278092507974408
≈0.0811572
Stored value0.081157220369092106
≈-0.00314537
Stored value-0.0031453735575351343
2≈0.0775694
Stored value0.077569416564372551
≈-0.288791
Stored value-0.28879137765995455
≈0.460557
Stored value0.46055740261644584

Rows and columns are zero-based. Stored-value disclosures preserve full floating output digits; they do not certify exact learned parameters. Mobile readers can inspect native values, activations and the kernel separately in the lab.

Original data, role lineage, all 255 predictions, training traces and parameters: optdigits.tra · optdigits.tes · optdigits.names · optdigits-orig.names · native-cnn-frame-lineage.csv · native5620-pixel-role-ledger.csv · core-native-inputs.csv · core-cnn-predictions.csv · learning-curve.csv · selected-model-parameters.csv · role-summary.csv · selected-activation-values.csv · selected-native-grid.csv · selected-kernel-values.csv

Python · R · Data and transformation scope

UCI · Alpaydin / Kaynak 1998 · DOI 10.24432/C50P49 · CC BY 4.0

학부Undergraduate

기업 사례: 신경망은 단순 예측보다 나은가Company case: is the neural model better than a simple forecast?

Apple의 공개 제품별 명목 매출 FY2019~2024를 읽습니다.5개 제품 범주마다 직전3년 매출을1×3 시간 창으로 놓고,현재 매출을 예측하는 작은 회귀 과제입니다. 입력과 목표를 같은 상수300000으로 나누며 원 단위는 백만 달러입니다. 인플레이션을 조정한 실질 산출이나 노동 생산성 자료가 아닙니다.

FY2022 목표5행은 훈련,FY2023 목표5행은 검증,FY2024 목표5행은 시험입니다.1×2 커널을 두 위치에 공유하고 활성값 두 개를 선형 출력층에 넣어 매개변수는6개입니다. 훈련 행5개와 공통 기업·시장 충격이라는 작은 근거로 일반적인 예측력을 입증할 수 없습니다. 전체 원 공시 값과 연도·제품·단위를 함께 읽습니다.

기본 검증은 학습률1/5의20단계를 선택합니다. 정규화 시험 MSE는약0.0489466으로 훈련 목표 평균 상수 기준의약0.0491657보다 조금 작습니다. 그러나 이 약한 상수 기준만으로 “CNN이 유용하다”라고 결론 내리면 안 됩니다. 제품별 규모와 직전 값을 유지하는 더 적절한 단순 비교가 필요합니다.

같은 제품의 전년도 매출을 그대로 다음 해 예측으로 쓰면,이 시험5행의 MSE는7317607/25000000000≈0.00029270428입니다. CNN보다 훨씬 작습니다. 새 자료를 추가한 것이 아니라 이미 입력 창에 있던 마지막 값을 사용했습니다. 복잡한 모형이 단순하고 강한 기준에 못 미치는 결과는 숨길 일이 아니라 개선할 질문을 알려 주는 학습 자료입니다.

이 마지막 값 기준은 공개 재현 코드에서 원 관측으로 직접 계산합니다. 훈련된 CNN의 검증 선택을 시험 정답으로 바꾸지는 않습니다. 비교 후 어떤 새 모형·자료·기간을 시도할지 정하려면 다음 독립 평가를 계획해야 합니다. 이 작은 결과로 투자 수익·제품 효과·원인 또는 실제 사업 성과를 추정했다고 말하지 않습니다.

기업 · 작은 CNN보다 중요한 강한 기준선

관측한 값은 Apple 공시에 보존된 5개 제품군의 명목 순매출이며 단위는 백만 달러입니다. 과거 3개 연도를 자연스러운 1×3 순서로 두고 300,000으로 나눴습니다. 각 역할 5행뿐이어서 복잡한 모형의 우수성을 판정할 자료가 부족합니다. 물가 조정 매출·생산량·시간당 생산성·투자 수익률을 측정한 사례가 아닙니다.

원 관측과 선언한 CNN을 구분
항목내용
입력 형태1×3
공유 필터1×2
함께 학습하는 부분공유 필터·편향 + 공간별 선형 출력·편향
손실평균 MSE + 편향을 제외한 가중치의 λ/2 L2 · λ=1/1000
선택학습률 1/20·1/5, 0~20단계의 엄격한 검증 최솟값
수치 범위학습값은 유한 부동소수 근사 · 정확도는 계산된 판정의 행 수 비율
역할별 고정 분모
역할행 수
train5
validation5
test5
학습률별 검증으로 고른 시점
후보학습률단계검증 MSE최종 선택 1
01/2020≈0.0474985
저장값0.047498495610483624
0
11/520≈0.0472991
저장값0.047299099170632276
1

훈련 평균 기준선만 두면 CNN이 조금 나은 것처럼 보입니다. 그러나 직전 연도 값을 그대로 쓰는 기준선의 시험 MSE는 정확히 7317607/25000000000이며 약 0.00029270428로 CNN 약 0.0489466보다 훨씬 작습니다. 300,000²를 곱해 원 단위로 되돌리면 그 단순 기준선의 시험 RMSE는 약 5,132.58백만 달러입니다. 작은 학습 예제를 실제 기업 예측 시스템으로 과장하지 않는 핵심 비교입니다.

같은 시험 행에서 비교
비교 모형시험 수MSE정확도TPFPTNFN
작은 CNN5≈0.0489466
저장값0.048946597715981179
미정의미정의미정의미정의미정의
훈련 표적 평균5≈0.0491657
저장값0.049165667759555561
미정의미정의미정의미정의미정의
같은 제품 직전 연도 값5≈0.000292704
저장값0.00029270428000000004
미정의미정의미정의미정의미정의
선택 학습률의 전체 훈련·검증 곡선
선택 학습률의 전체 훈련·검증 곡선

원 벡터 확대 · 그림의 전체 좌표 CSV

시험 실제값과 CNN 점수 · 확률 보정 주장 없음
시험 실제값과 CNN 점수 · 확률 보정 주장 없음

원 벡터 확대 · 그림의 전체 좌표 CSV

실제 원수치·학습한 활성값·공유 필터
실제 원수치·학습한 활성값·공유 필터

원 벡터 확대 · 그림의 전체 좌표 CSV

예시 행의 원 관측과 계산을 구분
필드값
예시 IDiPhone:FY2024
현재 파일actual30-Apple-product-sales-FY2019-2024.csv
현재 파일의 1기준 data-row6
관측 표적 원토큰201,183
역할test
CNN 점수 · 근사0.26297055382854306
추론 범위당해 제품 명목 순매출을 300,000으로 나눈 표적의 예측 · 실질 생산성 아님
원 입력 격자 · 데이터의 어휘 토큰 그대로
행/열012
0191,973205,489200,583
선택된 CNN 활성 격자 · 근사
행/열01
0≈0.0542151
저장값0.054215084056468063
≈0.0581093
저장값0.058109336120818735
학습한 필터 격자 · 근사
행/열01
0≈0.0464492
저장값0.046449249740028245
≈-0.110165
저장값-0.11016460656726014

행과 열은 0부터 셉니다. 저장값 펼치기는 부동소수 출력의 전체 자릿수를 보여주며, 학습한 모수가 수학적으로 정확하다는 뜻이 아닙니다. 모바일 실습에서는 원수치·활성값·필터를 각각 골라 읽을 수 있습니다.

원자료·역할 계보·전체 255개 예측·학습 이력·모수: actual30-Apple-product-sales-FY2019-2024.csv · native-cnn-frame-lineage.csv · native5620-pixel-role-ledger.csv · core-native-inputs.csv · core-cnn-predictions.csv · learning-curve.csv · selected-model-parameters.csv · role-summary.csv · selected-activation-values.csv · selected-native-grid.csv · selected-kernel-values.csv

Python · R · 자료·변환 범위

OTexts 3.1 · 평균과 단순 예측 기준선 읽기

Read Apple’s public nominal product sales for FY2019–2024. For each of five product categories, place the prior three annual values in a 1×3 window and predict current sales. Inputs and targets share a fixed divisor of 300000; native units are USD million. These are not inflation-adjusted output or labor productivity.

Five FY2022 targets train the model, five FY2023 targets validate it and five FY2024 targets test it. A shared 1×2 kernel over two locations and a linear readout give six parameters. Five training rows with common company/market shocks do not establish general forecasting validity. Preserve product, year, unit and filing values.

Default validation selects rate 1/5 at step twenty. Normalized test MSE is about 0.0489466, slightly below the constant training-mean baseline’s 0.0491657. A weak constant comparator alone cannot establish practical usefulness; product scale and persistence motivate a stronger simple baseline.

Predicting each product’s next value by its immediately preceding annual sales gives test MSE 7317607/25000000000≈0.00029270428 on these five rows, far below the CNN. It uses the last value already present in each input window. Failure to beat a strong simple baseline is useful learning evidence.

Public reproduction computes that last-value comparison from native observations without altering validation choice using test outcomes. Further model changes require a newly planned evaluation. This small exercise does not estimate investment returns, product effects, causality or operational business performance.

Company · a strong benchmark before a complex CNN

The observations are retained Apple disclosures of nominal net sales for five product categories, in USD millions. Three preceding annual values form a natural 1×3 sequence, divided by 300,000. Only five rows per role are available. These data do not measure real sales, physical output, hourly productivity or investment returns.

Separate observations from the declared CNN
ItemContent
Input shape1×3
Shared kernel1×2
Jointly learned componentsShared kernel/bias and spatial linear head/bias
LossMean MSE + λ/2 L2 on non-bias weights · λ=1/1000
SelectionStrict validation minimum over rates 1/20 and 1/5, checkpoints 0–20
Number scopeLearned values are finite floating approximations; accuracy is an exact ratio of computed decisions
Frozen role denominators
RoleRows
train5
validation5
test5
Validation-selected checkpoint for each rate
CandidateRateStepValidation MSEFinal selection: 1
01/2020≈0.0474985
Stored value0.047498495610483624
0
11/520≈0.0472991
Stored value0.047299099170632276
1

Against the constant training mean, CNN looks slightly better. A stronger benchmark simply carries forward each product’s last annual value: its exact test MSE is 7317607/25000000000, about 0.00029270428, far below CNN’s roughly 0.0489466. Multiplying MSE by 300,000² restores squared USD-million units; the last-value test RMSE is about USD 5,132.58 million. A small learning exercise is not a validated corporate forecasting system.

Compare on the same test rows
ComparatorTest rowsMSEAccuracyTPFPTNFN
Tiny CNN5≈0.0489466
Stored value0.048946597715981179
UndefinedUndefinedUndefinedUndefinedUndefined
Training-target mean5≈0.0491657
Stored value0.049165667759555561
UndefinedUndefinedUndefinedUndefinedUndefined
Same-product last-year value5≈0.000292704
Stored value0.00029270428000000004
UndefinedUndefinedUndefinedUndefinedUndefined
Complete training/validation curve for the selected rate
Complete training/validation curve for the selected rate

Enlarge original vector · Complete figure coordinates CSV

Observed test targets and CNN scores · no calibration claim
Observed test targets and CNN scores · no calibration claim

Enlarge original vector · Complete figure coordinates CSV

Observed native values, learned activations and shared kernel
Observed native values, learned activations and shared kernel

Enlarge original vector · Complete figure coordinates CSV

Separate native observation and calculation for the illustration
FieldValue
Illustration IDiPhone:FY2024
Current native fileactual30-Apple-product-sales-FY2019-2024.csv
One-based data row in current file6
Observed target token201,183
Roletest
Approximate CNN score0.26297055382854306
Inference scopePredict current nominal product net sales divided by 300,000; not real productivity.
Native input grid · original lexical tokens
Row/column012
0191,973205,489200,583
Selected CNN activation grid · approximate
Row/column01
0≈0.0542151
Stored value0.054215084056468063
≈0.0581093
Stored value0.058109336120818735
Learned kernel grid · approximate
Row/column01
0≈0.0464492
Stored value0.046449249740028245
≈-0.110165
Stored value-0.11016460656726014

Rows and columns are zero-based. Stored-value disclosures preserve full floating output digits; they do not certify exact learned parameters. Mobile readers can inspect native values, activations and the kernel separately in the lab.

Original data, role lineage, all 255 predictions, training traces and parameters: actual30-Apple-product-sales-FY2019-2024.csv · native-cnn-frame-lineage.csv · native5620-pixel-role-ledger.csv · core-native-inputs.csv · core-cnn-predictions.csv · learning-curve.csv · selected-model-parameters.csv · role-summary.csv · selected-activation-values.csv · selected-native-grid.csv · selected-kernel-values.csv

Python · R · Data and transformation scope

OTexts 3.1 · read mean and naive forecasting benchmarks

학부Undergraduate

실습 F: 관측·선택 단계·현재 응답을 연결하기Lab F: connect observations, selected checkpoints and current responses

국가 사례·기본 학습률 두 개·20단계·λ1/1000으로 시작합니다. 선택 후보와 단계0을 확인한 뒤 시험40행·상수 기준을 읽습니다. 훈련 곡선의 마지막 값과 선택한0단계의 평가를 혼동하지 마세요. 기록의 원 연도·현재 CSV행·상위 원 행 토큰은 서로 다른 좌표로 남깁니다.

개인 사례로 바꾸면 훈련48·검증16·시험32와 선택16단계를 확인합니다. 원 관측을 고르면64개 원 계수와 정규화 입력을 읽을 수 있습니다. 다른 관측의 활성 맵을 계산하려면 그 관측을 고르고 계산하기를 누르세요. 읽기 전용 원 행·표·페이지 선택만으로 모형이 다시 학습되지는 않습니다. 표시한 활성 맵의 계산 ID도 함께 확인합니다.

오답 optdigits.tes:1309를 찾아 실제 라벨1·점수약0.470089·예측0을 대조합니다. 실수한 그림을 삭제하면 시험 표의 질문을 바꾸게 됩니다. 모든32행과 원본 전체를 남기고,어떤 결과를 근거로 다음 실험을 설계할지 적습니다.0·1 외 숫자의 성능을 이 화면에서 확인한 것처럼 말하지 않습니다.

기업 사례에서는 시험5행과 정규화 점수의 단위를 읽습니다. 원 매출로 해석하려면300000을 곱합니다. 학습 곡선·CNN예측·훈련 평균 기준·마지막 값 기준을 같은 원 자료에서 비교하고,작은 표본의 한계를 남깁니다. 비용·수익·실제 투자 효과는 이 과제에서 관측한 값이 아닙니다.

마지막에는 한 사례를 정해 학습 단계를0으로 바꾸고 초기 평가와 비교합니다.20단계로 복원한 뒤 학습률 후보나 λ를 바꾸면 검증 선택부터 다시 계산해야 합니다. 언어·표시 단위·읽는 행만 바꾸는 동작과 실제로 모형을 다시 학습하는 동작을 구분해서 실험 기록에 적어 두세요.

Start with country data, the two default rates, twenty steps and λ=1/1000. Inspect selected checkpoint zero, then the forty test rows and constant baseline. The final training checkpoint differs from the selected zero-step model. Native year, current CSV row and upstream source-row token remain distinct coordinates.

For handwriting verify the 48/16/32 roles and selected step sixteen. Choose a native record to inspect its 64 counts and normalized input. Press Calculate for another record’s activation map; read-only record, table and page choices do not retrain the model. Check the explicit ID attached to a computed activation map.

Find optdigits.tes:1309 and compare native label one, score about 0.470089 and prediction zero. Deleting a mistake changes the test-frame question. Retain all 32 rows and the originals while planning a further experiment. This screen does not evaluate the other eight digit classes.

In the company case inspect the five test rows and normalized units. Multiply scores by 300000 for native USD-million interpretation. Compare learning curves, CNN, training-mean and last-value baselines using the same observations, retaining the small-sample limitation. Costs, returns and actual investment effects are not observed here.

Finally compare a zero-update run with initialization, then restore twenty steps. Changing rates or λ recomputes validation selection. Distinguish retraining from language, display-unit and read-only inspection changes in the experiment record.

학부Undergraduate

영상·연구자·함께 읽을 자료In-page video, researchers and guided reading

Stanford CS231n의2017년4월18일 공식5강은 합성곱·풀링과 비전 밖의 응용을 다룹니다. 아래 영상은 본문에서 재생합니다. 출력 크기와 커널 공유를 설명하는 구간을 보고,우리47개 매개변수 모형에서 같은 계산과 다른 설계를 각각 적어 보세요. 영상을 보았다는 사실은 손계산·실제 자료 재현을 대신하지 않습니다.

Yann LeCun·Léon Bottou·Yoshua Bengio·Patrick Haffner의1998년 문서 인식 논문을 연구사의 출발점으로 읽을 수 있습니다. 공저자 공식 서지에서 저자·연도·원문을 확인하세요. 우리가 사용하는 UCI의8×8 계수와 그 논문의 모든 실험이 같은 자료·모형이라고 혼동하지 않습니다.

Alex Krizhevsky·Ilya Sutskever·Geoffrey Hinton의2012년 ImageNet CNN 논문은 더 큰 영상 분류와 계산·모형 설계를 함께 읽는 연결 고리입니다. 이 장의 작은 흑백 계수·이진 과제·47개 매개변수 결과를 그 대규모 성적으로 포장하지 않습니다.

Kaiming He·Xiangyu Zhang·Shaoqing Ren·Jian Sun의2015년 rectifier 연구는 활성함수와 초기화가 연결된다는 심화 질문을 제공합니다. 여기의 결정적인 작은 초기값은 그 논문의 확률적 초기화 이론을 구현했다고 주장하지 않습니다. 어떤 가정 아래 분산이 전달되는지 별도 심화로 확인할 수 있습니다.

실습과 함께 공식 미분 검산·학습 진단 노트의 꺾임과 반올림 설명을 읽으세요. 기업 사례에는 예측:원리와 실제3.1의 단순 기준를 연결합니다. 마지막 관측을 예측으로 쓰는 방법이 왜 비교 기준이 되는지,우리 실제 매출 표의 숫자로 설명해 보세요.

The official Stanford CS231n lecture of 18 April 2017 covers convolution, pooling and applications beyond vision. Play it in the page below. Compare its output-size and sharing calculations with our 47-parameter model, identifying both common operations and different choices. Watching does not replace hand calculation or replication.

Yann LeCun, Léon Bottou, Yoshua Bengio and Patrick Haffner provide a historical reference through their 1998 document-recognition paper. Verify authors, year and source in the coauthor’s official bibliography. Do not equate all of its experiments with our UCI 8×8 count data.

Alex Krizhevsky, Ilya Sutskever and Geoffrey Hinton link model and computational design through their 2012 ImageNet CNN paper. Its large-scale image-classification setting differs from our small binary 47-parameter count model; its benchmark results are not results of this chapter.

Kaiming He, Xiangyu Zhang, Shaoqing Ren and Jian Sun connect rectifier activations and initialization in their 2015 rectifier study. Our deterministic small initialization is not an implementation of that probabilistic theory. Its variance assumptions provide a separate advanced reading question.

Read the official gradient-check and training notes on kinks and roundoff. Connect company forecasting to the simple baselines in Forecasting: Principles and Practice, Section 3.1. Explain the last-observation comparator using the actual sales values rather than architecture prestige.

학부Undergraduate

팀 프로젝트: 성공 주장보다 재현 가능한 질문Team project: a reproducible question before a success claim

한 팀이 한 사례를 맡아 원자료→포함·제외→역할→입력 변환→초기 모형→학습 경로→검증 선택→시험 평가를 한 장의 흐름도로 연결합니다. 실제 관측과 가상 변환·정해진 초기값·고른 기준 모형의 경계를 표시합니다. 사람과 기업에 관한 원인·효과를 추정하지 않았다면 제목에도 그런 효과를 추정했다고 쓰지 않습니다.

수학 담당은 손실·벌점·공유 미분·중앙 차분을 점검합니다. 자료 담당은 원 행·라벨·작성자·시간·결측과 단위를 읽습니다. 경제·경영 담당은 선택한 목표와 단순 기준이 실제 질문에 맞는지 따집니다. 교수 역할의 검토자는 설명의 전제와 증거 범위를 확인하고,처음 읽는 학생 역할은 어떤 용어·숫자·그림에서 이해가 끊겼는지 적습니다. 역할 분담이 실제 자격이나 검토의 완전성을 자동으로 부여하지는 않습니다.

결과를 미리 옹호하지 않는 읽는 사람은 오답과 실패를 삭제하지 않습니다. 국가의0단계 선택,기업의 강한 단순 기준보다 큰 오차,손글씨의 한 오답을 각각 설명할 수 있어야 합니다. “더 복잡해서 낫다” 대신 “이 원 자료·분할·후보·목적에서 이런 결과였다”라고 문장을 좁혀 씁니다.

제출물에는 재현 코드·전체 선택 출력 CSV·원 파일 식별·학습 곡선·한 실제 원 그림과 활성 맵·한 실패 실험을 넣습니다. 한국어와 영어 설명이 같은 입력·ID·단위·선택 단계를 가리키는지 대조하고,모바일에서 작은 표 글씨를 읽을 수 있는지 확인합니다. 다음 장에서는 실제 텍스트에서 분류와 출처 검증을 같은 원칙으로 설계합니다.

Choose one case and diagram the path from originals through inclusion, roles, transformation, initialization, training, validation choice and test evaluation. Mark observed data separately from hypothetical transformations, declared initialization and baseline choices. Do not title a study as estimating personal or business causal effects when it does not.

A mathematics role checks objectives, penalties, shared derivatives and differences. A data role checks native rows, labels, writers, time, missingness and units. Economics/business roles question targets and comparators. A professor-style reviewer examines assumptions and evidence scope; a first-time-student role records where terminology, numbers or figures interrupt understanding. Role assignment alone confers neither credentials nor complete review.

A neutral reader keeps mistakes and failed improvements visible. Explain the country zero-step choice, the company’s failure against a stronger simple baseline and the handwriting error. Replace “more complex is better” with a result qualified by these observations, splits, candidates and objectives.

Submit reproducible code, complete selected-output CSVs, original-file identities, learning curves, an observed image and activation map, and a failed experiment. Match Korean and English inputs, IDs, units and selected steps, and inspect small-table readability on mobile. The next chapter applies these principles to actual text classification and provenance.

영상·학자·함께 읽기Videos, thinkers and guided reading

본문의 질문을 넓히는 선택 학습입니다. 영상을 보기 전 질문을 먼저 읽고, 자신의 답을 쓴 뒤 해설과 비교하세요. 자료의 언어·선수 지식은 각 항목에 표시했습니다.Optional extensions to the chapter. Read the question first, write your answer, then compare with the explanation. Language and prerequisites are indicated below.

지역 공유와 매개변수 수Local sharing and parameter counts

Stanford CS231n

8×8 입력에서 필터와 출력층이 각각 무엇을 공유하는지 구분하세요.Distinguish what the filter and spatial head share on an 8×8 input.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 3×3 필터 한 개와 6×6 출력층이면 학습 모수는 몇 개인가요?How many trainable parameters for one 3×3 filter and 6×6 readout?

생각을 점검하는 해설Check your reasoning

9+1+36+1=47개입니다. 공간별 출력 비중은 필터처럼 공유하지 않습니다.9+1+36+1=47. Spatial readout weights are not shared like the kernel.

수치 기울기와 꺾이는 점Numerical gradients and kinks

Stanford CS231n

중앙차분·오차 비율·부동소수와 ReLU 경계를 읽습니다.Read central differences, relative error, finite precision and ReLU boundaries.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading h를 무조건 작게 하면 검산이 좋아지나요?Does arbitrarily small h improve the check?

생각을 점검하는 해설Check your reasoning

아닙니다. 빼기 소실과 꺾이는 구간을 따로 봅니다. 이 장의 정확 분수와 유한 근삿값을 비교하세요.No. Separate subtractive cancellation and changed active regions; compare exact fractions with finite projections.

실제 손글씨의 관측 단위Units of observed handwriting

UCI / Alpaydin and Kaynak

0~16 수치가 회색 사진의 0~255 밝기와 어떻게 다른지 읽습니다.Read why counts 0..16 differ from photographic intensities 0..255.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 수업 표본 31/32 정확도를 전체 10범주의 성능으로 써도 되나요?Can 31/32 core accuracy be reported for all ten classes?

생각을 점검하는 해설Check your reasoning

안 됩니다. 0/1을 균형 선택한 작은 시험 틀이며 원 전체 평가와 다릅니다.No. It is a small purposefully balanced 0/1 test frame, not the full benchmark.

복잡한 예측 이전의 기준선Benchmarks before complex forecasting

OTexts · selected3.1

훈련 평균과 마지막 값 기준선의 정보 집합을 구분합니다.Distinguish the information used by the mean and last-value benchmarks.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading Apple 사례에서 CNN과 평균만 비교하면 무엇을 놓치나요?What does comparing only CNN and the mean miss in the Apple case?

생각을 점검하는 해설Check your reasoning

같은 제품의 관측된 직전 값만으로 훨씬 작은 시험 오차를 얻는 단순 예측을 놓칩니다.It misses a much lower test error from simply carrying forward the same product’s observed last value.

합성곱 신경망의 연산과 학습Stanford CS231n 2017 Lecture 5 Convolutional Neural Networks

Stanford CS231n 2017

본문에서 합성곱의 가중치 공유와 경사 흐름을 확인합니다.Review shared convolutional weights and gradient flow in the in-page lecture.

본문에서 영상 재생Play the video in the chapter

보고 읽은 뒤 답하기Respond after watching/reading 합성곱 필터는 각 위치마다 별도의 가중치를 배우나요?Does a convolutional filter learn unrelated weights at each position?

생각을 점검하는 해설Check your reasoning

아닙니다. 같은 필터를 여러 위치에 공유합니다. 역전파에서는 그 위치들의 기여를 같은 가중치의 기울기에 합칩니다.No. The same filter is shared across positions; backpropagation adds their contributions to the gradient of that shared weight.

연습문제 · 계산에서 설명과 증명까지Exercises: calculation, explanation and proof

먼저 혼자 풀고 풀이를 여세요. 숫자와 함께 단위·포함 기준·계산 이유를 확인하세요.Attempt each problem before opening its solution. Check units, inclusion rules and the reason for the calculation.

1. 블록 계수와 이름표Block counts and labels

원 블록 계수0,8,16을16으로 나누세요. 정규화 값1과 정답 라벨1의 의미는 같은가요?

Normalize native block counts 0,8,16 by 16. Does normalized value 1 mean the same as target label 1?

풀이와 확인할 이유Solution and explanation

각각0,1/2,1입니다. 마지막 값1은4×4 블록의16개 점이 모두 켜졌다는 뜻입니다. 정답 라벨1은 전체 글자가 숫자1로 기록되었다는 별도 범주입니다. 입력은64칸이고 마지막 라벨 열은 입력에 넣지 않습니다.

The values are 0,1/2,1. An input value of one means all 16 pixels in that 4×4 block are active. Target label one identifies the written digit category. The 64 input cells exclude the final label column.

2. 이진 사례의 분모The denominator of a binary case

원 자료의0은554장,1은571장입니다. 두 종류를 모두 읽는 표에서 항상0으로 예측한 정답률과,0·1이16장씩인 작은 시험 표의 정답률을 구하세요.

Original data contain 554 zeros and 571 ones. Find always-zero accuracy on all of these two classes and on a small test frame with 16 images of each class.

풀이와 확인할 이유Solution and explanation

첫 분모는554+571=1125이고 정답 수는554이므로554/1125입니다. 두 번째는16/32=1/2입니다. 두 표의 클래스 구성이 달라 같은 예측 규칙도 정답률이 다릅니다. 어느 수치도 열 종류 전체5,620장의 평가라고 부를 수 없습니다.

The first frame has 554+571=1125 images and 554 correct predictions, giving 554/1125. The second gives 16/32=1/2. Different class mixtures change accuracy even for the same rule. Neither is an evaluation of all 5,620 images across ten classes.

3. 한 창의 교차상관Cross-correlate one window

입력[[1,2],[3,4]],커널[[1,0],[0,−1]],절편1/2의 출력을 구하세요.

Compute the output for input [[1,2],[3,4]], kernel [[1,0],[0,−1]], bias 1/2.

풀이와 확인할 이유Solution and explanation
1⋅1+0⋅2+0⋅3−1⋅4+12=−521\cdot1+0\cdot2+0\cdot3-1\cdot4+\tfrac12=-\tfrac52

각 위치끼리 곱하고 모두 더했습니다. 아직 ReLU를 적용하지 않아 음수−5/2를 그대로 남깁니다.

1⋅1+0⋅2+0⋅3−1⋅4+12=−521\cdot1+0\cdot2+0\cdot3-1\cdot4+\tfrac12=-\tfrac52

Multiply matching positions and add them. ReLU has not yet been applied, so retain the negative response −5/2.

4. 커널 반전의 영향The effect of reversing a kernel

앞 문제의 커널을[[−1,0],[0,1]]로 뒤집고 나머지를 유지하면 출력은 얼마인가요?

Reverse the previous kernel to [[−1,0],[0,1]] while keeping the input and bias. What is the response?

풀이와 확인할 이유Solution and explanation

−1×1+0×2+0×3+1×4+1/2=7/2입니다. 원 결과−5/2와 다릅니다. 비대칭 커널은 방향을 뒤집어도 같은 연산이라고 볼 수 없습니다. 절편1/2는 그대로 더합니다.

The response is −1×1+0×2+0×3+1×4+1/2=7/2, differing from −5/2. Reversal changes this asymmetric kernel. The unchanged bias 1/2 is still added.

5. 보폭2의 출력 크기Output size at stride two

8×8 입력,3×3 커널,보폭2의 valid 출력 크기와 가로 방향 마지막 창이 읽는0기준 칸 번호를 구하세요.

For an 8×8 input,3×3 kernel and stride 2, find valid output size and the zero-based horizontal indices in its last window.

풀이와 확인할 이유Solution and explanation

가로·세로 모두 floor((8−3)/2)+1=3이므로3×3입니다. 시작점은0,2,4이고 마지막 창은4,5,6을 읽습니다. 칸7을 포함하려고 불완전 창을 만들거나 패딩을 덧붙이면 이 문제와 다른 연산입니다.

Each dimension is floor((8−3)/2)+1=3, giving 3×3. Starts are 0,2,4; the last window reads 4,5,6. Adding a partial window or padding to include index 7 changes the specified operation.

6. 전체 모형의47개 매개변수All 47 model parameters

8×8입력에 공유3×3커널 하나·합성곱 절편·ReLU·36개 활성값을 받는 선형 출력층을 씁니다. 학습 매개변수 수를 구하고 평행이동 불변성이 자동으로 성립하는지 설명하세요.

Use one shared 3×3 kernel/bias, ReLU and a linear head over 36 activations from an 8×8 input. Count trainable parameters. Is final translation invariance automatic?

풀이와 확인할 이유Solution and explanation

커널9개, 합성곱 절편1개, 출력 가중치36개, 출력 절편1개로47개입니다. ReLU에는 이 예에서 학습할 매개변수가 없습니다. 출력 위치마다 다른 가중치가 있고 valid 경계도 달라지므로 최종 예측의 평행이동 불변성은 자동으로 성립하지 않습니다.

There are 9 kernel weights, one convolution bias,36 head weights and one output bias:47. ReLU adds no trainable parameter here. Spatially distinct head weights and valid boundaries mean that final prediction invariance does not follow automatically.

7. 시간 표를 그림으로 접는 가정The assumption behind folding time into an image

과거9년의 성장률을 오래된 순서대로3×3에 놓았습니다. 위아래 이웃과 좌우 이웃의 시간 간격은 같나요? CNN을 사용할 수 있다는 사실만으로 좋은 시계열 모형인가요?

Arrange nine prior annual growth rates in oldest-first 3×3 order. Do vertical and horizontal neighbors represent equal time gaps? Does the ability to run a CNN establish a good time-series model?

풀이와 확인할 이유Solution and explanation

좌우로 한 칸은1년, 위아래로 한 칸은3년 차이입니다. 모양은 정사각형이어도 실제 공간 사진은 아닙니다. 같은 커널을 공유하는 유도 편향을 정당화하거나, 의도적으로 부적절한 비교 사례로 분석해야 합니다. 실제 사례의 검증이 초기0단계를 선택하더라도 개선되지 않았다는 결과를 그대로 보고하고 단순 기준 모형과 비교합니다.

Horizontal neighbors are one year apart; vertical neighbors are three years apart. A square array is not an observed spatial image. Justify its sharing bias or use it explicitly as a questionable comparison. If validation selects the initial checkpoint, report the lack of improvement and compare a simple baseline.

8. ReLU의0과 도함수ReLU zero and its derivative

ReLU에−3,0,2를 넣은 값과 이 장이 선택한 각 지점의 도함수를 쓰세요.0에서 미분 가능하다는 뜻인가요?

Give ReLU outputs and the chosen derivatives at −3,0,2. Does the convention imply differentiability at zero?

풀이와 확인할 이유Solution and explanation

출력은0,0,2이고 선택한 도함수는0,0,1입니다.0의 왼쪽 기울기0과 오른쪽 기울기1이 달라 보통 도함수는 존재하지 않습니다. 이 장은 연산 규칙으로 그 지점의 값을0으로 선택합니다.

Outputs are 0,0,2; the chosen derivatives are 0,0,1. At zero the left and right slopes are 0 and 1, so the ordinary derivative does not exist. Selecting zero specifies an algorithmic convention.

9. 펼치기와 위치별 출력 가중치Flattening and spatial head weights

활성 맵[[1,0],[3,0]],출력 가중치[1,2,−1,4],출력 절편1/2의 점수를 구하세요.

Compute the score from activation map [[1,0],[3,0]], head [1,2,−1,4] and output bias 1/2.

풀이와 확인할 이유Solution and explanation

행 순서로 펼치면[1,0,3,0]입니다. 점수는1×1+2×0−1×3+4×0+1/2=−3/2입니다. 위치 순서를 바꾸면 같은 가중치와 짝지어지는 활성값이 바뀌어 다른 함수가 됩니다.

Row-major flattening gives [1,0,3,0]. The score is 1×1+2×0−1×3+4×0+1/2=−3/2. Reordering cells without corresponding weight changes defines a different function.

10. 제곱손실과 확률의 구별Squared loss versus probability

목표1,선형 점수−1의 제곱오차와 문턱1/2에서의 예측 라벨을 구하세요. 점수−1을 확률로 읽어도 되나요?

For target 1 and linear score −1, compute squared error and the label under threshold 1/2. Is −1 a probability?

풀이와 확인할 이유Solution and explanation

오차는−2, 제곱오차는4, 예측 라벨은0입니다. 선형 점수−1은 확률 범위 밖입니다. 제곱손실을 계산할 수 있다는 사실이 확률 모형이나 보정된 확률을 만들었다는 뜻은 아닙니다.

Error is −2, squared error 4 and predicted label 0. The linear score −1 lies outside the probability range. A computable squared loss does not establish a probability model or calibration.

11. 공유 커널의네 경로Four paths to one shared kernel

11절의2×2입력·한 칸 커널 예에서 커널 데이터 미분15/2를 네 경로의 합으로 다시 구하세요.

Recover kernel data derivative 15/2 in the Section 11 one-entry-kernel example by summing four paths.

풀이와 확인할 이유Solution and explanation

출력으로 온 미분은δ=3이고 각 위치의 출력 가중치는1/4입니다. 입력값1,2,3,4를 곱해3/4,3/2,9/4,3을 얻고 모두 더하면(3+6+9+12)/4=30/4=15/2입니다. 하나의 공유 매개변수이므로 네 기여를 더합니다.

The score derivative is δ=3 and each head weight is 1/4. Multiplying by inputs 1,2,3,4 gives 3/4,3/2,9/4,3. Their sum is (3+6+9+12)/4=15/2. All four paths use one shared parameter.

12. 겹치는 창의 입력 미분Input gradients from overlapping windows

3×3입력이 모두1,2×2커널도 모두1,합성곱 절편0,네 출력 가중치모두1,출력 절편0,목표0입니다. 가운데와 모서리 입력 칸의 손실 미분을 구하세요.

Let a 3×3 input and 2×2 kernel contain only ones, both biases be zero, all four head weights be one and target zero. Find loss derivatives for the center and a corner input cell.

풀이와 확인할 이유Solution and explanation

각 창의 응답4가 모두 활성화되고 점수는16입니다. 출력 손실 미분δ=32입니다. 가운데 입력은네 창에 들어가므로32×4=128,모서리는한 창에 들어가므로32입니다. 한 경로마다 출력 가중치와 커널 값은둘 다1입니다. 겹치는 경로를 빠뜨리면 가운데 미분을 잘못 계산합니다.

Each window response is 4, all gates are active and the score is 16. Thus δ=32. The center belongs to four windows, giving 32×4=128; a corner belongs to one, giving 32. Each path has head and kernel weights both equal to one.

13. 벌점은 어떤 매개변수에 붙는가Which parameters receive the penalty?

11절에서λ=1/5일 때 벌점·전체 목적함수·커널 미분·출력 절편 미분을 구하세요.

For Section 11 with λ=1/5, find penalty, total objective, kernel derivative and output-bias derivative.

풀이와 확인할 이유Solution and explanation

가중치 제곱합은1+4/16=5/4입니다. 벌점은(1/10)(5/4)=1/8, 전체 목적함수는9/4+1/8=19/8입니다. 커널 미분은15/2+1/5=77/10입니다. 절편은 벌점을 주지 않아 출력 절편 미분은3으로 유지됩니다.

The squared-weight sum is 1+4/16=5/4. Penalty is (1/10)(5/4)=1/8 and objective 9/4+1/8=19/8. Kernel derivative is 15/2+1/5=77/10. The unpenalized output-bias derivative remains 3.

14. 꺾임의선택과 중앙차분A kink convention and centered differences

f(b)=ReLU(b),목표1,벌점0에서 b=0의 선택한 손실 미분과 보폭h>0의 중앙차분을 구하세요.

For f(b)=ReLU(b), target 1 and no penalty, find the chosen loss derivative at b=0 and the centered difference with step h>0.

풀이와 확인할 이유Solution and explanation

선택한 ReLU 미분0을 쓰면 손실 미분도0입니다. 그러나 L(h)=(h−1)²,L(−h)=1이므로 중앙차분은((h−1)²−1)/(2h)=−1+h/2입니다. h→0에서−1로 가는 것은 매끈한 도함수가 있다는 뜻이 아닙니다. 왼쪽 손실 기울기0과 오른쪽−2가 다른 꺾임을 가로질렀기 때문입니다.

The chosen ReLU derivative zero gives a chosen loss derivative zero. Yet L(h)=(h−1)² and L(−h)=1, so the centered difference is −1+h/2. Its limit−1 does not establish an ordinary derivative: it crosses a kink with left loss slope 0 and right slope−2.

15. 음의 기울기와 갱신 방향A negative derivative and its update

매개변수1/2,기울기−3/10,학습률1/5일 때 새 값을 구하세요.

Update parameter 1/2 with derivative −3/10 and rate 1/5.

풀이와 확인할 이유Solution and explanation
12−15(−310)=1425\frac12-\frac15\left(-\frac3{10}\right)=\frac{14}{25}

음의 기울기에 대해 매개변수는 증가합니다. 마이너스를 두 번 읽어야 하며, 기울기 자체를 새 매개변수로 쓰는 것은 아닙니다.

12−15(−310)=1425\frac12-\frac15\left(-\frac3{10}\right)=\frac{14}{25}

A negative derivative increases the parameter under descent. Subtract the scaled derivative rather than replacing the parameter by the gradient.

16. 평균 손실의 첫 미분First derivatives of mean loss

14절의 두 행에서 출력 절편과 커널 미분을 구하고,제곱오차를 평균 대신 합했다면 몇 배가 되는지 설명하세요.

Find output-bias and kernel derivatives for the two rows in Section 14. How do they change if squared losses are summed rather than averaged?

풀이와 확인할 이유Solution and explanation

평균 손실에서는 두 오차3/20과−3/5의 합이 출력 절편 미분−9/20입니다. 커널은 둘째 행에서만 입력1이 기여해(−3/5)(1/2)=−3/10입니다. 합 손실은N=2배이므로 두 데이터 미분도2배입니다. 벌점까지 같은 문제로 만들려면 그 계수도 함께 조정해야 합니다.

For mean loss, residuals 3/20 and −3/5 sum to output-bias derivative −9/20. Only the second row contributes to the kernel: (−3/5)(1/2)=−3/10. A sum data loss multiplies both by N=2; preserving the whole optimization problem also requires scaling its penalty coefficient.

17. 체크포인트와 갱신 횟수Checkpoints and update counts

초기 평가를 포함해0부터20까지 기록했습니다. 실제 갱신은 몇 번이며,학습률 두 후보의0단계가 같다면 독립된 초기 모형 두 개인가요?

A run records checkpoints 0 through 20 including initialization. How many updates occurred, and are equal zero-step states under two rates independent initial models?

풀이와 확인할 이유Solution and explanation

갱신은20번이고 평가 기록은21개입니다. 같은 초기값의0단계는 같은 모형을 두 후보에서 다시 평가한 것입니다. 서로 독립된 초기화 표본 두 개라고 해석할 수 없습니다.

There are 20 updates and 21 recorded checkpoints. The identical initial state evaluated under two candidate rates is not two independent initialization draws.

18. 0초기값이 멈추는 이유Why zero initialization can stall

16절에서 K,h,합성곱 절편0,출력 절편1/2일 때 두 훈련 행의 출력 절편 미분이0이 되는 이유와 더 좋은 모형을 쓰세요.

In Section 16, why is the output-bias derivative zero at K=h=convolution bias=0, output bias 1/2? Give a better model.

풀이와 확인할 이유Solution and explanation

두 점수는1/2이고 목표는0,1이므로 평균 손실 미분에 들어가는 오차는1/2와−1/2로 상쇄됩니다. 다른 가중치 미분도0입니다. 그러나 K=h=1,두 절편0은 x=0,1을 그대로 예측해 훈련 MSE0입니다. 따라서 멈춘 경로의 MSE1/4는 전역 최저가 아닙니다.

Both scores are 1/2, so residuals 1/2 and −1/2 cancel in the mean-loss output-bias derivative. Other chosen gradients also vanish. Yet K=h=1 with both biases zero fits x=0,1 exactly and gives training MSE 0 rather than 1/4.

19. 같은 함수와 다른 벌점Equal functions with different penalties

양수 s로 K와 합성곱 절편을 s배,h를1/s배 합니다.함수와 L2 벌점은 각각 어떻게 되나요?

For positive s, multiply K and convolution bias by s and divide h by s. What happens to the function and L2 penalty?

풀이와 확인할 이유Solution and explanation

ReLU(sz)=sReLU(z)이므로 출력 가중치의1/s와 상쇄되어 함수는 같습니다. 그러나 벌점은λ/2(s²||K||²+s⁻²||h||²)로 바뀝니다. 일반적으로 기존 벌점과 같지 않으며,합성곱 절편에는 이 장에서 벌점을 주지 않습니다.

ReLU(sz)=sReLU(z), so the head’s 1/s factor cancels the activation scale and preserves the function. Penalty becomes λ/2(s²||K||²+s⁻²||h||²), generally differing from its previous value. The convolution bias is unpenalized here.

20. 검증의 가장 이른 최저점The earliest validation minimum

검증 MSE가 단계0,1,2,3에서0.4,0.2,0.2,0.3입니다.선택 단계와 마지막 단계는 무엇이며,시험 MSE를 보고 바꾸어도 되나요?

Validation MSE at steps 0,1,2,3 is 0.4,0.2,0.2,0.3. Identify the selected and final steps. May test MSE change that selection?

풀이와 확인할 이유Solution and explanation

가장 이른 최저점 규칙은1단계를 선택하고 마지막은3단계입니다. 선택한 모형과 마지막 모형은 다를 수 있습니다. 시험 MSE로1단계 대신 다른 단계를 고르면 시험 자료를 모형 선택에 사용하게 되어 원 평가 절차와 달라집니다.

The earliest-minimum rule selects step 1; the final step is 3. The selected and final models can differ. Choosing another checkpoint after inspecting test MSE uses test data for selection and changes the declared evaluation procedure.

21. 매출 MSE를 원 단위로 환산하기Return sales MSE to native units

매출을300000으로 나눈 목표에서 MSE가1/100이면 원 백만 달러 단위의 MSE와 RMSE는 얼마인가요?

Targets divide sales by 300000. If normalized MSE is 1/100, what are MSE and RMSE in native USD-million units?

풀이와 확인할 이유Solution and explanation

MSE는300000²/100=900000000 백만 달러 제곱입니다. RMSE는300000×sqrt(1/100)=30000 백만 달러입니다. 제곱오차와 오차는 변환 배수가 다르고,단위를 바꾸었다고 예측 성능이 개선되는 것은 아닙니다.

Native MSE is 300000²/100=900000000 (USD million)². RMSE is 300000×sqrt(1/100)=30000 USD million. Errors and squared errors have different scale factors; changing units does not improve predictions.

22. 중앙차분의 이차식 항등식The quadratic centered-difference identity

L(t)=at²+bt+c에서 중앙차분을 전개하세요.어떤 이유로 이 식에서는 h²오차가 남지 않나요?

Expand the centered difference for L(t)=at²+bt+c. Why is no h² error left here?

풀이와 확인할 이유Solution and explanation
a[(t+h)2−(t−h)2]+b[(t+h)−(t−h)]2h=2at+b\frac{a[(t+h)^2-(t-h)^2]+b[(t+h)-(t-h)]}{2h}=2at+b

상수 항은 상쇄되고 h²항도 양쪽에서 상쇄됩니다. 이는 이차식의 항등식이며 더 높은 차수나 일반 비선형 함수에서 같은 정확성을 보장하지 않습니다.

a[(t+h)2−(t−h)2]+b[(t+h)−(t−h)]2h=2at+b\frac{a[(t+h)^2-(t-h)^2]+b[(t+h)-(t-h)]}{2h}=2at+b

Constant and h² terms cancel. This identity for quadratics does not establish the same exactness for higher-degree or general nonlinear functions.

23. 0인 두 미분의 상대 차이Relative discrepancy between two zeros

해석 미분과 중앙차분이 둘 다0일 때 |차이|/max(|두 값|)를 그대로 계산하면 무엇이 되나요?

If both analytic and centered derivatives are zero, what happens to |difference|/max(|the two values|)?

풀이와 확인할 이유Solution and explanation

분자와 분모가 모두0이므로0/0입니다. 이 장은 둘 다0이라는 상태를 따로 표시하고 상대 차이 값을0으로 약속합니다. 이 약속이 “미정의 분모를 항상0으로 대체하라”는 일반 규칙은 아닙니다.

Both numerator and denominator are zero, producing 0/0. We separately flag bothZero and conventionally report relative discrepancy zero in that state. This is not a general rule to replace undefined denominators by zero.

24. 꺾임에서의−1999/2000The kink value−1999/2000

21절의 h=1/1000에서 중앙차분을 구하고 선택한0미분과 다른 이유를 쓰세요.

Find the Section 21 centered difference at h=1/1000 and explain its disagreement with the chosen derivative zero.

풀이와 확인할 이유Solution and explanation

−1+h/2=−1+1/2000=−1999/2000입니다. 양쪽 이동이 서로 다른 ReLU 영역을 읽으므로 하나의 매끈한 도함수와 비교하는 조건이 성립하지 않습니다.0은 코드가 선택한 꺾임 규칙이며 존재하지 않는 보통 도함수의 정확한 값은 아닙니다.

The value is −1+1/2000=−1999/2000. Opposite perturbations read different ReLU regions, violating a smooth-derivative comparison condition. Zero is a chosen kink convention, not the value of an existing ordinary derivative.

25. 정확 미분2와 근사 차분0Exact derivative two and numerical difference zero

L(k)=k²,k=1,h=1e-200에서 양쪽 손실이 모두 binary64의1로 반올림되면 중앙차분은 무엇이며 정확값과 왜 다른가요?

For L(k)=k², k=1, h=1e-200, both losses round to binary 64 one. What centered difference results, and why does it differ from the exact value?

풀이와 확인할 이유Solution and explanation

투영한 손실의 차이는1−1=0이므로 근사 차분은0입니다. 정확한 분자(1+h)²−(1−h)²=4h를 나누면2입니다. 소거 전에 두 손실의 작은 차이가 표현에서 사라졌기 때문이지 원래 함수의 미분이0이기 때문이 아닙니다.

The projected numerator is 1−1=0, giving numerical difference zero. The exact numerator is 4 h and the exact quotient is two. Rounding removes the small loss difference before subtraction; it does not make the original derivative zero.

26. 작은 제곱을0이라고 부를 수 있는가May a tiny square be called zero?

정확한 1e-200의 제곱이 binary64에서0으로 표시됩니다.수학적 값과 수치 훈련의 처리 방식을 구분하세요.

The square of exact 1e-200 displays as binary 64 zero. Distinguish its mathematical value from numerical-training behavior.

풀이와 확인할 이유Solution and explanation

수학적으로 양의 1e-400입니다. 정확한 분수 표시는 그 비영 값을 유지합니다. 수치 훈련에서는 비영 두 인자의 곱이0으로 내려가면 계산 범위 오류를 내며,완벽한 손실0으로 조용히 진행하지 않습니다. 이는 수학적 문제가 정의되지 않았다는 뜻이 아니라 사용한 수치 계산의 한계입니다.

The mathematical value is positive 1e-400. Exact fractions retain it. Numerical training rejects a nonzero product lost to zero rather than silently reporting perfect loss. This marks a computational limit, not an undefined mathematical problem.

27. 기준 모형의 시험 평균 사용Using the test mean in a baseline

훈련 목표 평균1/2,시험 목표 평균3/4입니다.상수 기준 모형을 시험에서3/4로 바꾸어 비교해도 같은 기준 모형인가요?

Training target mean is 1/2 and test target mean 3/4. Is replacing the test baseline by 3/4 the same model?

풀이와 확인할 이유Solution and explanation

아닙니다. 훈련으로 정한 상수1/2를 시험에도 유지해야 고정한 기준을 평가합니다. 시험 평균3/4를 사용하면 시험 정답으로 새로운 상수를 맞춘 셈입니다. 해당 절차 자체를 분석할 수는 있지만 원래의 외부 평가와 다른 질문입니다.

No. Retain the training-fitted constant 1/2 for test evaluation. Using 3/4 fits a new constant to test outcomes. That procedure can be studied explicitly, but it is a different question from the declared fixed-model evaluation.

28. 사용하지 않는 벌점과 overflowAn unused penalty and overflow

λ=0,입력0,선형 출력0인 모형에 큰 유한 가중치가 있습니다.사용하지 않는 가중치 제곱합의 overflow만으로 데이터 MSE0 평가를 실패시켜야 하나요?

With λ=0, input zero and output zero, a model contains a very large finite weight. Must an unused squared-weight norm’s overflow make its zero data-MSE evaluation fail?

풀이와 확인할 이유Solution and explanation

벌점은 정의상0이므로 그 경로를 계산하지 않아도 됩니다. 데이터 순전파와 손실이 정상이라면 사용하지 않는 norm을 계산하다가 실패시키지 않습니다.λ>0의 실제 벌점이나 실제 순전파 곱이 범위를 넘는 경우와 구별해야 합니다.

The penalty is identically zero and its path need not be evaluated. A valid forward/loss calculation should not fail because of an irrelevant norm. Distinguish that case from overflow in an actual positive penalty or an actually used forward product.

29. 정답률1·MSE1/16Accuracy one with MSE 1/16

점수1/4,3/4와 목표0,1에서 문턱1/2의 정답률과 MSE를 구하세요.

Compute accuracy at threshold 1/2 and MSE for scores 1/4,3/4 and targets 0,1.

풀이와 확인할 이유Solution and explanation

두 예측은0,1이므로2/2=1입니다. 제곱오차는각각1/16이므로 평균도1/16입니다. 정답률은 문턱 뒤의 결정, MSE는 문턱 전 점수와 목표 차이를 읽습니다.

Predictions are 0,1, giving 2/2=1. Both squared errors are 1/16, so MSE is 1/16. Accuracy reads thresholded decisions; MSE reads score discrepancies before thresholding.

30. 문턱을 바꾸면 변하는 지표Which metric changes with a threshold?

앞 문제의 문턱을1로 바꾸면 정답률과 MSE는 무엇인가요?

Change the previous threshold to 1. What are accuracy and MSE?

풀이와 확인할 이유Solution and explanation

두 점수 모두1보다 작아 예측은0,0입니다. 한 개만 맞아 정답률1/2이며 점수는 그대로라 MSE1/16입니다. 문턱 선택을 학습 또는 검증으로 정하지 않고 시험 결과를 보고 바꾸면 평가 역할이 달라집니다.

Both scores lie below 1, so predictions are 0,0 and accuracy 1/2. Scores are unchanged, leaving MSE 1/16. Selecting a threshold after seeing test outcomes changes the evaluation role.

31. 같은 상수 규칙의 다른 정답률Different accuracy for one constant rule

32장 중 양성16장인 손글씨 표와40행 중 양성32행인 국가 표에서 항상1로 예측한 정답률을 구하세요.

Find always-one accuracy on handwriting with 16 positives among 32 images and country data with 32 positives among 40 rows.

풀이와 확인할 이유Solution and explanation

각각16/32=1/2와32/40=4/5입니다. 국가의0.8이라는 수치가 이 규칙이 성장의 복잡한 특징을 학습했다는 증거는 아닙니다. 클래스 구성과 훈련에서 고정한 기준 모형을 함께 읽어야 합니다.

The accuracies are 1/2 and 4/5. A country accuracy of 0.8 does not show that the rule learned complex growth patterns. Read class composition and the training-fixed baseline.

32. 두 로짓의 softmax와 미분Two-logit softmax and its gradient

로짓이(0,0),목표 클래스가1일 때 softmax확률·교차엔트로피·로짓 미분을 구하세요.

With logits(0,0) and target class 1, compute softmax probabilities, cross-entropy and logit derivatives.

풀이와 확인할 이유Solution and explanation

확률은(1/2,1/2),손실은ln2입니다. 두 로짓 미분은p−onehot=(1/2,−1/2)입니다. 확률의 유리수 값과 로그 손실의 값을 같은 유리수라고 주장하지 않으며, 이 미분은 제곱손실의2(f−y)와 다릅니다.

Probabilities are (1/2,1/2), loss is ln 2 and derivatives are (1/2,−1/2). Rational probabilities do not make the logarithmic loss rationally exact. This gradient differs from squared loss’s 2(f−y).

33. 픽셀 중복과 작성자 중복Pixel duplicates versus repeated writers

선택한 훈련과 검증의64칸 표가 모두 다르면 작성자도 독립이라고 할 수 있나요?

If every selected 64-cell vector differs between training and validation, are writers independent?

풀이와 확인할 이유Solution and explanation

그렇지 않습니다. 한 작성자가 여러 다른 글자를 쓸 수 있고, 다른 사람이 같은 계수 표를 만들 수도 있습니다. 작성자 ID 또는 수집 설계의 증거가 필요합니다. 현재 원 훈련 파일 안의 분할에는 작성자 ID가 없어 그 독립성을 주장하지 않습니다.

No. One writer can produce many different vectors, and different writers can share a representation. Writer IDs or collection-design evidence are needed; IDs are unavailable for this within-training-file split.

34. 두 클래스 성적을 열 클래스 성적으로 부를 수 있는가May binary performance describe ten-class recognition?

0·1만 학습한 시험32장 중31장 정답을 원본0~9전체의 성적이라고 발표해도 되나요?

May 31 correct among 32 zero/one test images be reported as performance on all original digits 0..9?

풀이와 확인할 이유Solution and explanation

안 됩니다. 목표·표본·출력층이 다릅니다. 전체 열 클래스 평가에는 각 클래스의 포함 기준·역할·열 개 점수의 판정 규칙과 독립 평가가 필요합니다. 다른 숫자를 전부0으로 바꾸는 문제도 원0·1과 다른 이진 과제입니다.

No. Targets, frame and output layer differ. Ten-class evaluation needs its own inclusion rules, roles, ten-score decision rule and held-out results. Mapping every other digit to zero also defines a different binary task.

35. 반올림된 동률의 위험The risk of a rounded tie

검증 오차0.1000001과0.1000002가 화면에는둘 다0.1000으로 보입니다.표시 값만 보고 동률로 처리해도 되나요?

Validation errors 0.1000001 and 0.1000002 both display as 0.1000. May selection treat them as tied?

풀이와 확인할 이유Solution and explanation

표시 반올림은 선택 규칙이 아닙니다. 원 계산값에서는 첫 값이 작습니다. 구현 간 차이의 검산 허용값도 임의의 선택 동률 기준으로 바꾸지 않습니다. 실제 사용한 수치·후보 순서·선택 결과를 남겨야 합니다.

Display rounding is not a selection rule; the first raw value is smaller. A cross-implementation checking tolerance must not silently become a new tie criterion. Retain the values, candidate order and actual selection.

36. 국가의0단계 선택 해석Interpret a country zero-step selection

검증이0단계를 선택했고 CNN과상수 기준의 시험 정답률이둘 다4/5입니다.어떤 결론을 쓸 수 있나요?

Validation selects step zero and both CNN and constant baseline have test accuracy 4/5. What conclusion is supported?

풀이와 확인할 이유Solution and explanation

사전 후보·기간·목적에서 학습 갱신의 검증 개선이 확인되지 않았고 시험 정답률도 상수 기준을 넘지 못했다는 결론입니다. 정답률0.8을 복잡한 경제 구조의 학습이나 정책 효과로 해석할 수 없습니다. 같은 표의 MSE·클래스 구성·구성한3×3격자의 적합성도 읽습니다.

The declared candidate procedure finds no validation improvement from updates, and test accuracy does not exceed the constant baseline. Accuracy 0.8 does not establish learned economic structure or policy effects. Read MSE, class composition and the constructed raster’s suitability too.

37. 실제 오답의 혼동표 위치Locate the actual error in a confusion table

원라벨1인 optdigits.tes:1309의 점수가약0.470089입니다.문턱1/2의 예측과 오류 종류를 쓰세요.

Native label for optdigits.tes:1309 is 1 and score about 0.470089. Give the threshold 1/2 prediction and error type.

풀이와 확인할 이유Solution and explanation

점수가1/2보다 작아 예측0입니다. 실제 양성1을음성0으로 읽어 거짓 음성FN입니다. 시험 표의 TP15,FP0,TN16,FN1과 함께31/32를 계산할 수 있지만,이 한 장으로 모든 작성자의 실패 원인을 확정하지 않습니다.

The score is below 1/2, so prediction is 0: a false negative. The test counts TP 15, FP 0, TN 16, FN 1 give 31/32 accuracy. One image does not identify failure causes for all writers.

38. 약한 기준보다 조금 나으면 충분한가Is a small gain over a weak baseline enough?

기업 시험 MSE가 CNN약0.0489466,상수약0.0491657,마지막 값약0.000292704입니다.보고 문장을 쓰세요.

Company test MSE is about 0.0489466 for CNN,0.0491657 for constant, and 0.000292704 for last-value forecast. State the result.

풀이와 확인할 이유Solution and explanation

CNN은 이 작은 표에서 상수 기준보다 약간 작지만 이미 입력에 있는 마지막 값 기준보다 훨씬 큰 오차입니다. 실무적으로 우수한 예측이라고 결론 내릴 근거가 없습니다. 표본5행·제품별 규모·공통 충격과 후속 독립 평가의 필요성을 함께 적습니다.

On this small frame, the CNN slightly improves on the constant but is far worse than the available last-value comparator. Practical forecasting superiority is not established. Retain the five-row limitation, product scales, common shocks and need for a later independent evaluation.

39. 마지막 값 기준의 원 단위 MSENative-unit MSE for the last-value baseline

정규화 MSE7317607/25000000000을 원 백만 달러 단위의 MSE로 바꾸세요.

Convert normalized MSE 7317607/25000000000 to native(USD million)².

풀이와 확인할 이유Solution and explanation
731760725000000000 3000002=1317169265=26343385.2\frac{7317607}{25000000000}\,300000^2=\frac{131716926}{5}=26343385.2

단위는 백만 달러의 제곱입니다. 제곱근을 취한 RMSE는약5132.58백만 달러입니다. MSE와RMSE를 같은 단위라고 표시하지 않습니다.

731760725000000000 3000002=1317169265=26343385.2\frac{7317607}{25000000000}\,300000^2=\frac{131716926}{5}=26343385.2

Units are (USD million)²; RMSE is about 5132.58 USD million. MSE and RMSE must not share a unit label.

40. 관측 그림과 가상 격자 구분Observed images versus constructed rasters

손글씨8×8표와 국가9시차3×3표를 각각 실제 공간 사진이라고 부를 수 있나요?

May both the handwriting 8×8 table and nine-lag country 3×3 table be called observed spatial photographs?

풀이와 확인할 이유Solution and explanation

손글씨 표는 실제 비트맵의4×4블록 켜진점 계수를 보존한 공간 표현이며 일반 사진의8비트밝기와도 단위가 다릅니다. 국가 표는9개 연도 값을 분석자가 접어 만든 배열이지 관측된 공간 사진이 아닙니다. 두 입력 모두 수치 행렬이지만 이웃 관계의 근거는 다릅니다.

Handwriting preserves spatial counts of active pixels within 4×4 bitmap blocks, not ordinary 8-bit photographic intensity. The country matrix is a constructed arrangement of annual values, not an observed spatial photograph. Numerical arrays can have different neighborhood justifications.

41. 기업 모형의6개 매개변수The company model’s six parameters

입력1×3,커널1×2하나,합성곱 절편,ReLU,활성값두 개의 선형 출력층을 씁니다.매개변수 수와 훈련행5개에서 주의할 점을 쓰세요.

Count parameters for a 1×3 input, one 1×2 kernel/bias, ReLU and a linear head on two activations. What needs care with five training rows?

풀이와 확인할 이유Solution and explanation

커널2,합성곱 절편1,출력 가중치2,출력 절편1로6개입니다. 매개변수 수만으로 과적합이 반드시 발생한다고 증명할 수는 없지만,5행·공통기업 충격·겹치는 시차의 작은 근거를 성능 보장으로 확장하지 않아야 합니다. 단순하고 강한 기준과 별도 기간 평가가 중요합니다.

There are 2 kernel weights, one convolution bias,2 head weights and one output bias: six. Parameter count alone does not prove inevitable overfitting, but five correlated/overlapping rows do not establish broad performance. Use strong simple baselines and separate-period evaluation.

42. 다음 실험의 독립 평가 설계Design an independent evaluation for the next experiment

오답 그림을 보고 증강·초기값·학습률을 바꾸었습니다.같은32장만 다시 평가해 최종 새 성적이라고 써도 되나요?

After inspecting an error image, you change augmentation, initialization and rate. May reevaluation on the same 32 images be reported as a fresh final test?

풀이와 확인할 이유Solution and explanation

그32장은 이제 새 선택에 영향을 준 자료입니다. 탐색 과정의 성적이라고 기록할 수 있지만 새 독립 시험이라고 부르면 안 됩니다. 사용하지 않은 작성자·기간·자료를 미리 정하고,새 후보 선택과 평가 역할·원자료·코드를 고정한 후 평가해야 합니다.

Those 32 images now influence selection. Their new score can describe exploration, but not a fresh independent test. Prespecify unused writers, periods or observations, and fix candidates, roles, originals and code before the next evaluation.

자료와 출처Data and sources

실습에 추가한 실제 입력과 출처Additional observed lab inputs and provenance

실제 자료 사례Actual-data cases · 원자료·단위·결측·변환·출처Inputs, units, missingness, transformations and sources

자료별 확보일·원행 식별·단위·이용 조건은 출처 기록을 확인하세요. 학습 사본은 제공처의 현재 최신 자료와 다를 수 있습니다.Consult each source record for retrieval dates, row identifiers, units and terms. Teaching copies can differ from current provider releases.

자료사전·출처·이용 조건Data dictionary, sources and terms