0
$\begingroup$

The input to a convolutional layer of a neural network is an image of size $128\times 128\times 3.$

$ 40$ convolutional filters of size $5\times 5$ are applied to it. Would you get an output? If no then why not? If yes, what will be the output size?

$\endgroup$

1 Answer 1

0
$\begingroup$

Yes, and it would be $124 \times 124 \times40$.

To calculate the output dimensions:

$(dim_x - filterdim_x + 1) \times (dim_y - filterdim_y + 1) \times filters$

in your case:

$(128 - 5 + 1) \times (128 - 5 + 1) \times 40 = 124 \times 124 \times40$

$\endgroup$
2
  • $\begingroup$ It also depends on padding and stride parameters also @Simon. $\endgroup$ Jul 14, 2020 at 4:28
  • $\begingroup$ That is correct. $\endgroup$ Sep 15, 2020 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.