teamtomo / membrain-seg

membrane segmentation in 3D for cryo-ET
Other
48 stars 12 forks source link

Implement mixed precision for training and inference #20

Closed LorenzLamm closed 11 months ago

LorenzLamm commented 11 months ago

Mixed precision for both training and inference.

Using mixed precision during training allows for larger batch sizes and slightly faster training speed (time-wise bottleneck is still data augmentation, which is not affected here).

For segmentation, there is also a slight speed-up, but the main advantage is that inference requires less GPU memory. Thus, it should now be easily possible to perform the prediction using an 8GB GPU -- previously, 8GB was just about the margin causing problems for some users.