by kerasteam2 · 3y ago · 0 comments
If you want to make a model with a custom train_step that is cross-backend, you can do something like:
def train_step(self, *args, *kwargs):
if keras.config.backend() == "tensorflow":
return self._tf_train_step(*args, *kwargs)
elif ...
BTW it looks the previous account is being rate-limited to less than 1 post / hour (maybe even locked for the day) so I will be very slow to answer questions.No comments yet.