google / objax

Apache License 2.0
769 stars 77 forks source link

Add warning: calling checkpoint.save() within a replicate() saves the replicated variables #163

Closed carlini closed 3 years ago

carlini commented 3 years ago

If you save a checkpoint from within a with model.replicate(), then it will checkpoint the replicated variables. This is the correct behavior, but it might be convenient to add a warning that this is happening and ask if the user didn't intend to checkpoint from outside of the replicate().