Volume parameters: No direct multiplying relation to the size of the input image

A normal two-dimensional volume learns a set of space cores for each output channel across the input channel.

Thematic shorts • IntroductionCollate in 2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives 2 first fixes

Try to do it after reading

  • Calculating parameters by channel and nuclear size
  • Distinguishing parameter and calculation

Suggested first

  • Thrust and Matrix Operations
  • Basic neural network

Share weights between space locations

A normal two-dimensional volume learns a set of space cores for each output channel across the input channel. The same set of cores is reused at all locations, so that the parameters are determined by the input channel, the output channel, nuclear dimensions and deviations and are not directly multiplied by the image's width. Larger images usually increase the calculation and activation of memory rather than the weight of the layer.

Enter a deviation of 8 x 3 x 3 x 3 = 224 for each output channel 3, output channel 8, core 3 x 3 + 3 + 8. If you enter from 32 x 32 to 64 x 64, there are still 224 parameters. The size of the output space depends on the size and length of the process, and network implementation costs cannot be judged by parameters alone.

For each output pixel, a normal volume of 3 x 3 x 3 = 27 times is required, with each output channel counted separately. If the output is 32 x 32 x 8, the total multiplied by the size is approximately 22,1184 multiplied items. The deviations, non-linearity and realization details are not taken into account and are only arithmetical estimates of the specified unit.

Grouping changes the connection structure

groups =1 is a full-channel connection; groups = 3 and the number of channels is compatible, each output channel only connects to the corresponding input group, and the number of input channels in the parameter formula is changed to the number of each group. It is not possible to claim how much savings the group structure saves while still using the common formula, and it is necessary to confirm that the passages can be removed.

Nor is it a stand-alone value for each pixel. It's usually broadcast through the output channel and shared in space. If you misunderstand that there is a bias in each location, the parameter estimate expands with the size of the image and misunderstands the structure involved.

Networks with the same number of participants do not necessarily have the same speed. Small nuclear stacking, grouping, RAM integration affects actual equipment utilization. The small number of parameters does not mean that the activation is low, and deep high resolution features may occupy the main training memory.

This section is as it stands. PyTorch 2 Conv2d and CS231n It's a classic definition. FLOPs Baseline. 224 and 221184 are synthetic structure calculations, with no delay in measuring equipment. The comparison model should be presented in parallel with parameters, effective input dimensions, calculators and actual operating conditions.

Value recovery

assert 8*3*3*3+8 == 224
assert 32*32*8*3*3*3 == 221184
3 input channel, 8 output channel, 3x3 nuclear belt bias, what are the parameters?

216 nuclear rights plus 8 deviations for 224.

Do you have four times the weight of the image?

No, weight sharing is constant and output position and calculation and activation are usually increased.

When the volume is fully connected, the input resolution may indirectly change the subsequent full connection parameter. Here "image does not directly change parameters" only for this volume layer and cannot be extended to all layers of any complete network.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. CS231n — Convolutional Neural Networks
  2. PyTorch — Conv2d

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.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.