Skip to content
Snippets Groups Projects

Porting to TF2

Merged Tiago de Freitas Pereira requested to merge tf2 into master
1 unresolved thread

Fixes #75 (closed)

Edited by Amir MOHAMMADI

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
246 )
247 return model
248
249
250 class CustomBackupAndRestore(tf.keras.callbacks.experimental.BackupAndRestore):
251 def __inti__(self, custom_objects, **kwargs):
252 super().__inti__(**kwargs)
253 self.custom_objects = custom_objects
254 self.custom_objects_path = os.path.join(self.backup_dir, "custom_objects.pkl")
255
256 def on_epoch_end(self, epoch, logs=None):
257 super().on_epoch_end(epoch, logs=logs)
258
259 # pickle custom objects
260 with open(self.custom_objects_path, "wb") as f:
261 pickle.dump(self.custom_objects, f)
  • added 3 commits

    Compare with previous version

  • Amir MOHAMMADI added 1 commit

    added 1 commit

    • 400c5d99 - Add a callback that backups and restores other callbacks

    Compare with previous version

  • Amir MOHAMMADI changed the description

    changed the description

  • Amir MOHAMMADI added 26 commits

    added 26 commits

    Compare with previous version

  • Amir MOHAMMADI mentioned in commit c2b538b0

    mentioned in commit c2b538b0

  • mentioned in issue #77 (closed)

  • Please register or sign in to reply
    Loading