I am starting to learn more about using Bayesflow, but I don’t have much experience with keras before, so this might be a trivial question. After training my network using a ModelComparisonApproximator I saved it using approximator.save("..\..\Results\model_v1.keras") and then later loaded it again with keras.saving.load_model("..\Results\model_v1.keras").
However, whereas the confusion matrix on simulated data using this code pred_models = approximator.predict(conditions= simulator.sample(10000))directly after training looked like this
I reinstalled BayesFlow from dev using pip install git+https://github.com/bayesflow-org/bayesflow.git@dev. I tried again, but the results where the same, but I also got this warning now: UserWarning: Skipping variable loading for optimizer 'adam', because it has 1 variables whereas the saved optimizer has 169 variables.
thank you for reporting this. Could you please create an issue on the repo, including a minimal reproducible code sample? We will work on fixing the issue ASAP.