Open mengxue-rs opened 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.
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.
We were also unable to find the author's implementation of TreatCornerCases
- see this comment.
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.
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.