Open francesco-vaselli opened 1 year ago
Hey Francesco,
Yeah, this is expected, we don't explicitly initialize the autoregressive_net to identity. The flag applies to the spline function only.
I think having a way to initialize the whole flow to (near?) identity could be useful. I'd happily review a PR on this.
Cheers,
Artur
Hello and thanks for the work on the package,
I am doing some tests with the identity initialization for rational quadratic splines. When using the new identity init implemented in #65 , giving in input
x = torch.tensor([1, 1e-2 ,1e-6, 1e-8, 1e2], dtype=torch.float32)
the following is the inverse for the untrained network (which should be initialized as the identity):If instead I manually set the weights of the last layer to 0 in the last layer of the transform network (as done in the normflows package) I get the identity as expected:
I was wondering whether you could help me figure out this difference in behavior. If this seems potentially useful I can work more than gladly on a pull request. Best regards, Francesco