Hi,
I am using BayesFlow 2.0.7 with the PyTorch backend and have repeatedly encountered training instabilities with spline coupling flows. Training initially proceeds normally, but after a variable number of epochs, the loss and gradients suddenly become NaN.
My flow architecture uses five inference variables, three coupling layers, spline transformations with four bins, and MLP subnetworks with two hidden layers of 96 units each. ActNorm is disabled.
I have verified that the adapted input data and inference variables are finite. I have also monitored the gradients, and the non-finite gradients appear to originate in the flow transformation layers rather than the summary network.
Are there any known numerical-stability issues with this type of architecture in BayesFlow 2.0.7? I noticed that coupling flows and their MLP subnetworks were substantially revised in later versions, particularly in PR #671. I mainly want to rule out a known BayesFlow issue that may already have been addressed in a newer release.
Thank you!