Closed schreon closed 4 years ago
It is intended. (1) applies w0 scaling to the kernel matrix before performing the dot product, thereby returning a preactivation matrix that is scaled to have zero mean and unit std. This is due to the SIREN initializer.
(2) is to perform long range mapping of the input to multiple cycles of the sine wave.
Turns out, the original paper doesnt use this form. I've therefore split apart the two implementations. The standard variant implements the paper version, and there now exists a "scaled" variant of the Dense layer as well as the MLP.
First of all: Thanks for providing an implementation of SIREN for tensorflow so quickly after the release of the paper!
I did notice that there are 2 places where w0 multiplication is applied:
https://github.com/titu1994/tf_SIREN/blob/master/tf_siren/siren.py#L124 (along with the other if-cases)
Is this intended?