htjb / margarine

Code to replicate posterior probability distributions with bijectors/KDEs and perform marginal KL/bayesian dimensionality calculations.
MIT License
13 stars 8 forks source link

Allowing users to pass learning rate schedulers #15

Closed htjb closed 1 year ago

htjb commented 1 year ago

Solving issue #14 but changing the conditional check on the learning_rate kwarg to

if not isinstance(self.learning_rate,
                          (int, float,
                           keras.optimizers.schedules.LearningRateSchedule)):
            raise TypeError("'learning_rate', " +
                            "must be an integer, float or keras scheduler.")