ソースを参照

[nnUNet/PyT] fix pyprof import

Michal 4 年 前
コミット
ce7926fc80
1 ファイル変更1 行追加1 行削除
  1. 1 1
      PyTorch/Segmentation/nnUNet/main.py

+ 1 - 1
PyTorch/Segmentation/nnUNet/main.py

@@ -14,7 +14,6 @@
 
 import os
 
-import pyprof
 import torch
 from pytorch_lightning import Trainer, seed_everything
 from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint
@@ -29,6 +28,7 @@ if __name__ == "__main__":
     args = get_main_args()
 
     if args.profile:
+        import pyprof
         pyprof.init(enable_function_stack=True)
         print("Profiling enabled")