In week1 of the Deep Learning course 4, the edge detectors are explained. When implement the code in assignment, we just give how many filters and kernel size we will assign in each layer.
This look like, to me, the values (weights) in the kernel are not specific for edge filtering. Why the edges filters are not used? or when do I need to enforce edge filters?
It is a really interesting question! Prof Ng gives the example of a “hard-coded” edge detector filter just to demonstrate how the convolution process works. It turns out that style of hard-coded filters is “old school” and is how things used to be done before back propagation was invented and had gotten to the level that it has achieved as of 8 or 10 years ago. These days we never hard-code any filters: we just define the network architecture, randomly initialize the filter values and then let the filters be learned during training through back propagation. What they actually end up detecting can only be deduced by analyzing the behavior of the trained network after the fact. Prof Ng will present some very cool work that shows how to do that in Week 4 of the course. The lecture is titled “What are Deep Convnets Learning?” You will definitely want to “hold that thought” until you get to Week 4 and watch that lecture. Actually it would probably still make sense if you watch it now out of sequence.