Skip to content

Commit

Permalink
adapt batch-size for inverse deformations
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schwab PI Sjors Scheres added 22022021 committed Oct 18, 2023
1 parent 34825fa commit 4cb7696
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dynamight/deformations/optimize_deformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,8 @@ def optimize_deformations(
'dec_half2_optimizer': dec_half2_optimizer.state_dict(),
'indices_half1': half1_indices,
'indices_val': val_indices,
'refinement_directory': refinement_star_file}
'refinement_directory': refinement_star_file,
'batch_size': batch_size}
if final > finalization_epochs or epoch == n_epochs-1:
checkpoint_file = checkpoints_directory / 'checkpoint_final.pth'
torch.save(checkpoint, checkpoint_file)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def optimize_inverse_deformations(
encoder_half2 = checkpoint['encoder_half2']
decoder_half1 = checkpoint['decoder_half1']
decoder_half2 = checkpoint['decoder_half2']
batch_size = checkpoint['batch_size']
poses = checkpoint['poses']

encoder_half1.load_state_dict(checkpoint['encoder_half1_state_dict'])
Expand Down
Binary file modified dynamight/models/__pycache__/decoder.cpython-310.pyc
Binary file not shown.

0 comments on commit 4cb7696

Please sign in to comment.