Volume and Feel Field: What input does an output see
From the two-dimensional hand count, track the passageway, the steps, the padding and the multilayered feeling field.
Learning objectives and first steps4 objectives • 3 first fixes
Try to do it after reading
- Two-dimensional volume volume slide
- Output shape with Parameter
- Passive sense of wild and sample spacing
- Distinguishing variability, boundary and lower sampling effects, etc
Suggested first
- Accumulation and Matrix
- Threshold
- Chain law
It's based on the local evidence that makes up the whole picture
The edges, textures and sub-targets in the images are, first and foremost, local phenomena. If all pixels are distributed directly to the entire connection layer, parameters will increase rapidly and there is no structure that explicitly uses the adjacent location sharing model. The volume repeats the same group of local weights over space: the same test rules can be used in different locations and more deeply combined with evidence of a wider range.
This structure also applies to some sequence local models, but does not represent that all time intervals can be handled directly in equidistance pixels. This first limits two-dimensional single-channel composite images, ignores non-linear and training, and only checks the algorithms. 2026-10-29 Check CS231n, D2L 1.0.3 and ResNet original; Both the map and the small matrix were original and did not repeat the pictures of the materials.
The deep learning library usually calculates interconnectivity
The shape for X is for H x W and the nuclear K is for kh x kw, and the output of a location is the sum of the components of the overlay window and check. Many frameworks also refer to the inter-relationship of non-rotation as volume; The agreement must be stated in the calculations. A mathematically strict discrete volume usually consists of a nuclear reversal, which cannot be used in a fixed nuclear case.
Take Inputs[[1,2,3],[4,5,6],[7,8,9]]Nuclear[[1,0],[0,-1]]stride = 1, padding = 0, bias = 0. The top left window output is 1-5 = -4, top right 2-6 = -4, bottom left 4-8 = -4, bottom right 5-9 = − 4. The output is a 2x2 matrix, each element being -4. The negative output does not represent a miscalculation, but merely indicates that the response to the local difference is negative.
The output size is not based on graphs
General measure for length of one dimension is: first to add input to L+2p, as the dilation is expanded tod(k−1)+1, then press stride s move, getfloor((L+2p−d(k−1)−1)/s+1)Places. Two-dimensional application to high width. If L = 5, k = 3, p = 1, d = 1, s = 2, the result is 3. The step that the boundary is barely covered in its entirety does not automatically remain because it “looks so close”.
For multichannels, often enter shape as[B,Cin,H,W], weights[Cout,Cin,kh,kw], each output channel aggregates all the connected input channels. General Volume Cin = 3, Cout = 8, 3x3 with bias, in total8×3×3×3+8=224parameter. The output space changes in size and the amount of parameters does not usually change as the same core is shared.
Grouping changes the channel connection to the depth volume and does not continue the formula of the parameters for the complete connection. Different frameworks may also default to NHWC layouts; The migration is made with a clear axis meaning and then transpose, and not only shape is "accidentally capable".
Feel the wild and move it with the sample spacing
The interval between the two adjacent positions of a layer of output on the original input is recorded as j; The theoretical range of an output overwrite is recorded as r. Initial r = 1, j = 1. The new range is: k, dilation d, stride s, after the nuclear size of the layerr′=r+(k−1)d·j, new interval asj′=j·sI don't know. padding will also influence the centre position and will need to be tracked separately, not just one size.
For example, three layers, three volumes, one, two, two, one, one, one, one, r = three, j = one; Second level r = 5, j = 2; Level 3 r = 9, j = 2. The third layer of output covers the original nine-position range, with two original locations at adjacent output centres. A direct addition of three nuclear dimensions to nine, although this happens to be the same, does not explain why the result of a change in stride will change and cannot be a common method.
# 标准 Python,已执行;采用不翻转核的互相关。X = [[1,2,3],[4,5,6],[7,8,9]]K = [[1,0],[0,-1]]Y = [[sum(X[i+a][j+b]*K[a][b] for a in range(2) for b in range(2)) for j in range(2)] for i in range(2)]assert Y == [[-4,-4],[-4,-4]]r, jump = 1, 1for kernel, stride in [(3,1),(3,2),(3,1)]: r += (kernel-1)*jump jump *= strideassert (r,jump) == (9,2)Borders, migration and practical contributions
The sharing of local kernels provides a variable structure such as migration, but the limited images of padding, cropping, sampling and input plug-in can undermine certain precise relationships. (b) Move the image to a pixel and not necessarily only the output pane of stride = 2; This is also one of the reasons why targets are sensitive to the manner in which samples are taken. Theories of the field only indicate the existence of a computational path and do not prove that all the overlay positions contribute as much.
Debug models are compared to output using known small matrices and then check each layer of shape, padding and channel layout. The models need to look further, and can increase depth, adjust stride, use dilation or focus, but together assess spatial resolution, alias effect, computation and tasks. For detection and separation, it is not enough to simply seek to feel the wild, but also to keep the location details.
Adding reverse calculations to see the cost of sharing weights
The same nuclear parameter is used for multiple windows, which add all windows to the reverse. Assuming that the loss in this case is the sum of four outputs, the gradient for the top left nuclear parameter is from the top four input to the left, the values 1, 2, 4, 5, and the sum of 12; The gradient for the lower right nuclear parameter is from 5, 6, 8, 9, sum 28. Their current parameter values are 1 and −1, respectively, without prejudice to the local decomposition of this linear sub-measure to the parameter. If the loss is changed to an output average, both gradients are divided by four.
The input gradient also converges at the overlapping window position: intermediate pixels participate in multiple outputs and receive contributions from multiple paths. The conversion volume can be understood from this linear conversion relationship, but it is not normally a counter-calculation of the input image, because the information may have been lost by stride, channel compression or other processing. Calling the samples “recovering the original map” makes it easier for readers to think that the missing details are necessarily recovered.
The mission scale is also taken into account in the selection process. The fixed 3x3 core covers only small areas on high-resolution images, and the corresponding coverage of real objects changes as a result of adjusting input scaling. When comparing networks, log input sizes, scaling strategies and reprocessing, otherwise the calculated costs and the size of the object may vary.
Self-measurement and interpretation
Why is the first output of this case −4 instead of 4?
The agreement is inter-related, the core has not been reversed, and the calculation is 1 x 1+2x0+4x0+5x(-1)=−4. Flipping the core will change the fixed calculation result.
Multiply the size of the image and double the volume parameters?
Usually not, the core is shared in space; Activate and calculate the volume changes. Structures such as full connectivity need to be calculated separately.
How many parameters is the 3 input channel, the 8 output channel, the 3 nuclear belt bias?
8x3x3x3+8=224, assuming a normal two-dimensional volume not grouped.
Second level, stride, from two to one. Third level feeling field or nine?
No, three nuclear, all stride1 in three, five, seven, and the adjacent centre is always one.
same padding Guaranteeing that any framework is arbitrary stride Same output?
It can't be so generalized. The output-to-right alignment rule needs to be checked, especially in cases where even numbers and steps are greater than 1.
Does the theoretical sense of the field cover the entire image to prove that the model uses global information?
It can only be explained that the structure allows these positions to have an impact. Actual weights, non-linearity and data determine the effective contribution and require additional analysis.
Then you read Test and Split and map the features into the frame and the pixel target. The principle is based on the above-mentioned first-hand course and thesis, and standard Python calculations and feelings have been calculated; No framework training or image model performance tests were claimed to have been carried out.
Sources and reconciliations
Definitions, methods and interfaces are available.
- CS231n — Convolutional Neural Networks
- Dive into Deep Learning — Convolutions for Images
- Deep Residual Learning for Image Recognition
Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.