diff --git a/examples/object_detection_compression/compress_detector.py b/examples/object_detection_compression/compress_detector.py old mode 100644 new mode 100755 index 4f477c3bb297509ac3471183fff7e364a9af7674..07718a637722d68974e25c040b5e52152f00c09c --- a/examples/object_detection_compression/compress_detector.py +++ b/examples/object_detection_compression/compress_detector.py @@ -145,9 +145,10 @@ def main(args): patch_fastrcnn(model) model.to(device) - if args.summary and utils.is_main_process(): - for summary in args.summary: - distiller.model_summary(model, summary, args.dataset) + if args.summary: + if utils.is_main_process(): + for summary in args.summary: + distiller.model_summary(model, summary, args.dataset) return model_without_ddp = model