Week 13 Discussion Thread

how do you make python scripts for the process?

Hello there is something I do not know regarding the Section ‘Mapping a Convolutional Kernel’ . It says ‘to get a grid of coordinates …’ Nested List Comprehension part is ok. But the result of the comprehension is not clear for me. What are these 16 coordinates? Are they mid points of the kernel for convolutional calculations? Why not 12 then, there are 12 calculations possible on 5x5 grid . Am I wrong, what am I missing here?
Thanks

What are these 16 coordinates?>> These are the output of given list comprehension
Are they mid points of the kernel for convolutional calculations? >> No, just an example to show what the list comprehension looks like!
Why not 12 then, there are 12 calculations possible on 5x5 grid . >> See again in the context of List Compre Am I wrong, what am I missing here? >> No you are not wrong, the next cell is the answer you are looking for where the kernel has been applied!

rng = range(1,27)
top_edge3 = tensor([[apply_kernel(i,j,top_edge) for j in rng] for i in rng])

show_image(top_edge3);

1 Like

Thanks girijesh, for the clarification. Np with the list comprehension and the output of it. I was confused about the concept. I was expecting range(1,4) in the list comprehension considering the 5x5 grid above. As you said next cell is just how I expect. Thanks again.

1 Like