Skip to content

Commit 0e314d8

Browse files
author
rpehkone
committed
Add different image channels warning to export onnx Megvii-BaseDetection#1692
1 parent 85c22a4 commit 0e314d8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/export_onnx.py

+3
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ def main():
6565
exp = get_exp(args.exp_file, args.name)
6666
exp.merge(args.opts)
6767

68+
if exp.color_channel != args.num_channels:
69+
logger.warning(f"When exporting to ONNX, it is important to ensure that the image channels match those used during training.")
70+
6871
if not args.experiment_name:
6972
args.experiment_name = exp.exp_name
7073

0 commit comments

Comments
 (0)