Skip to main content
added 8 characters in body
Source Link
nbro
  • 41.4k
  • 12
  • 114
  • 205

For a standard convolution layer, the weight matrix will have a shape of (out_channels, in_channels, kernel_sizes*) in(out_channels, in_channels, kernel_sizes). In addition, you will need a vector of shape [out_channels][out_channels] for biases. For your specific case, 2d, your weight matrix will have a shape of (out_channels, in_channels, kernel_size[0], kernel_size[1])(out_channels, in_channels, kernel_size[0], kernel_size[1]). 

Now, if we plugin the numbers:

  • out_channels = 10out_channels = 10, you're having 10 filters
  • in_channels = 3in_channels = 3, the picture is RGB in this case, so there are 3 channels (the last dimension of the input)
  • kernel_size[0] = kernel_size[1] = 3kernel_size[0] = kernel_size[1] = 3

In total you're gonna have 1033*3 + 10 = 28010*3*3*3 + 10 = 280 parameters.

For a standard convolution layer, the weight matrix will have a shape of (out_channels, in_channels, kernel_sizes*) in addition you will need a vector of shape [out_channels] for biases. For your specific case, 2d, your weight matrix will have a shape of (out_channels, in_channels, kernel_size[0], kernel_size[1]). Now if we plugin the numbers:

  • out_channels = 10, you're having 10 filters
  • in_channels = 3 the picture is RGB in this case so there are 3 channels (the last dimension of the input)
  • kernel_size[0] = kernel_size[1] = 3

In total you're gonna have 1033*3 + 10 = 280 parameters.

For a standard convolution layer, the weight matrix will have a shape of (out_channels, in_channels, kernel_sizes). In addition, you will need a vector of shape [out_channels] for biases. For your specific case, 2d, your weight matrix will have a shape of (out_channels, in_channels, kernel_size[0], kernel_size[1]). 

Now, if we plugin the numbers:

  • out_channels = 10, you're having 10 filters
  • in_channels = 3, the picture is RGB in this case, so there are 3 channels (the last dimension of the input)
  • kernel_size[0] = kernel_size[1] = 3

In total you're gonna have 10*3*3*3 + 10 = 280 parameters.

added 124 characters in body
Source Link
razvanc92
  • 1.2k
  • 1
  • 9
  • 18

For a 2dstandard convolution layer, the weight matrix will have a shape of (out_channels, in_channels, kernel_sizes*) in addition you will need a vector of shape [out_channels] for biases. For your specific case, 2d, your weight matrix will have a shape of (out_channels, in_channels, kernel_size[0], kernel_size[1]) and [out_channels] for biases. Now let'sif we plugin the numbers:

  • out_channels = 10, you're having 10 filters
  • in_channels = 3 the picture is RGB in this case so there are 3 channels (the last dimension of the input)
  • kernel_size[0] = kernel_size[1] = 3

In total you're gonna have 1033*3 + 10 = 280 parameters.

For a 2d convolution your weight matrix will have a shape of (out_channels, in_channels, kernel_size[0], kernel_size[1]) and [out_channels] for biases. Now let's plugin the numbers:

  • out_channels = 10, you're having 10 filters
  • in_channels = 3 the picture is RGB in this case so there are 3 channels (the last dimension of the input)
  • kernel_size[0] = kernel_size[1] = 3

In total you're gonna have 1033*3 + 10 = 280 parameters.

For a standard convolution layer, the weight matrix will have a shape of (out_channels, in_channels, kernel_sizes*) in addition you will need a vector of shape [out_channels] for biases. For your specific case, 2d, your weight matrix will have a shape of (out_channels, in_channels, kernel_size[0], kernel_size[1]). Now if we plugin the numbers:

  • out_channels = 10, you're having 10 filters
  • in_channels = 3 the picture is RGB in this case so there are 3 channels (the last dimension of the input)
  • kernel_size[0] = kernel_size[1] = 3

In total you're gonna have 1033*3 + 10 = 280 parameters.

Source Link
razvanc92
  • 1.2k
  • 1
  • 9
  • 18

For a 2d convolution your weight matrix will have a shape of (out_channels, in_channels, kernel_size[0], kernel_size[1]) and [out_channels] for biases. Now let's plugin the numbers:

  • out_channels = 10, you're having 10 filters
  • in_channels = 3 the picture is RGB in this case so there are 3 channels (the last dimension of the input)
  • kernel_size[0] = kernel_size[1] = 3

In total you're gonna have 1033*3 + 10 = 280 parameters.