Yeah, it should be possible. I have been able to save entire models with train_step(). Here’s one such example:

  
      

      keras.io
  

  
    

Keras documentation: Self-supervised contrastive learning with SimSiam 12