oracleofnj / spectral-repr-cnns

Implementation of Rippel, Snoek, and Adams 2015 (https://arxiv.org/pdf/1506.03767.pdf)
MIT License
38 stars 18 forks source link

About the ifft #29

Open mengxue-rs opened 5 years ago

mengxue-rs commented 5 years ago

In you code, your implementation is im_out = tf.real(tf.ifft2d(im_transformed)) But due to the truncate ops, I think tf.abs(~~~) is more reasonable. Another question is that the pooling value scope has been changed due to the truncate ops.

oracleofnj commented 5 years ago

It has been a while since we did this project, but if I remember correctly, I think the imaginary part is always very small (essentially zero except for floating point precision) due to the way that the transformation is performed so tf.real() and .abs() are essentially equivalent in this case.

mengxue-rs commented 5 years ago

Thanks for your reply! I think you are right. But I also have some confusion about the TREATCORNERCASES in the Spectral Representations for Convolutional Neural Networks . First, I can't find the paper 's supplementary materials by googling it. Next, I think enforce all values of ifft to real is too much rigorous comparing with only keeping conjugate symmetry constraints.

oracleofnj commented 5 years ago

We were also unable to find the author's implementation of TreatCornerCases - see this comment.

mengxue-rs commented 5 years ago

Hi Jared, thanks for your reply fervently! Recently, I implement the spectral pooling's conjugate symmetry constraints using the matlab. I think this script seem look like more reasonable and maybe helpful for further research. sp.txt

I also notice that the spectral pooling's backpropagation description in the paper, while I only know little about how to do it with tensorflow.