The difference between add and concatenate

add (add values)

The content of tensor elements is added, and the number of channels does not change (that is, the value is added).
eg:
The core of Resnet- identity mapping is to add the original eigenvalue after convolution, but the dimension remains unchanged and the value changes.
insert image description here

concatenate (dimension addition)

The concatenate operation is used to combine features , fuse features extracted by multiple convolutional feature extraction frameworks, or fuse information from the output layer. Concatenate is the combination of the number of channels , which means that the features describing the image itself are increased, but the information under each feature is not increased.

eg:
The densnet network is to add the previous layer as input ( in DenseNet, all the previous layers will be connected as input )
insert image description here
I hope this article is useful to you!
Thank you for your likes and comments!

Guess you like

Origin blog.csdn.net/qq_44936246/article/details/121068720