Aadnan Farooq A
Aadnan Farooq A

Reputation: 646

Parameters and computational time of epoch increases with the increasing channels of input image?

I have different sets of images at input (i.e. 56x56x3, 56x56x5, 56x56x10, 56x56x30, 56x56x61) with the same network.
1) I want to know that the number of parameters of network will be same for each input?
2) Computational time of each epoch is slightly higher by increasing the number of channels at input, is it normal?

UPDATE

Parameter calculation for 3 channels
3*3*3*64 = 1728
3*3*64*128 = 73728
3*3*128*256 = 294912
5*5*256*512 = 3276800
1*1*512*1024 = 524288
1*1*1024*4 = 4096

Parameter calculation for 10 channels
3*3*10*64 = 5760
3*3*64*128 = 73728
3*3*128*256 = 294912
5*5*256*512 = 3276800
1*1*512*1024 = 524288
1*1*1024*4 = 4096

enter image description here

Upvotes: 0

Views: 167

Answers (1)

Harsh Wardhan
Harsh Wardhan

Reputation: 2158

For performing convolution it is necessary that any kernel (or filter) has the same number of channels as the input feature map (or image), for the corresponding layer. And the number of parameters for that layer is given as:

No of Kernels x Kernel Height x Kernel Width x No of Channels in the Kernel

So you see that the number of parameters are actually directly proportional to the number of channels in the input feature map. And it is obvious that as the number of parameters increase the number of computations also increase, hence the increased computational time.

You may see the detailed explanation of convolution operation in my post here.

Upvotes: 1

Related Questions