Difference between Conv and convn

Source: Internet
Author: User

The result is the ESS floor Sam flipped convolution inversion matrix.

Clear all;

A = [1 2 3];
B = [4 5 6];
Resfull1 = Conv (a, B, 'full ');
Ressame1 = Conv (a, B, 'same ');
Resvalid1 = Conv (a, B, 'valid ');
% Full: convolution in the general sense
% Same: the same length as the convolution input.
% Valid: After the convolution inversion alignment, the alignment here is very special and cannot be filled with 0;
% Conv: used only for convolution of two one-dimensional signals in the signal system

A = [1: 25];
B = zeros (5, 5 );
B (:) = (:);
B = B'

H = [1 1 1; 1 1 1; 1 1 1];
Resfull = convn (B, H, 'full ');
Ressame = convn (B, H, 'same ');
Resvalid = convn (B, H, 'valid'); % valid: calculated. H. After the translation is flipped, it must all be in B. No fill
% Convn is used to calculate Two-Dimensional Signal Convolution; convolution of two image matrices
% Full: The result matrix size is 5 + 3-1: 3 is the size of H.
% Valid; Size: X-2 * (floor (y/2): X indicates the size of the input matrix, and y indicates the size of H.

Difference between Conv and convn

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.