iKintosh / GaborNet

https://ikintosh.github.io/GaborNet/
MIT License
102 stars 26 forks source link

Questions about calculate_weights() #27

Open copyrightly opened 3 years ago

copyrightly commented 3 years ago

Hi Andrey, I have a couple of questions about calculate_weights().

  1. in line 106-109, why do you need expand_as(self.y)?
  2. in line 118, why do you need to divide g by (2 math.pi sigma ** 2)? I cannot find this in the original expression of Gabor filters. Thank you!
copyrightly commented 3 years ago

One more question, in line 91, why do you self.register_parameter("weight", self.weight)? It seems that self.weight is an empty tensor which isn't needed in the computation.

happyday521 commented 3 years ago

@copyrightly Hi, have you solved the above problems? I have the same confusion as you about:

  1. dividing g by (2 math.pi sigma ** 2), and
    1. self.register_parameter("weight", self.weight)