No conv bn folding in ipex to avoid warning (#19870)

* no conv bn folding in ipex

* no flag in training

* comment

Co-authored-by: Sander Land <sander@chatdesk.com>
This commit is contained in:
Sander Land 2022-10-26 14:58:52 +02:00 committed by GitHub
parent 802b98c72b
commit fdffee8a60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1280,7 +1280,8 @@ class Trainer:
if not training:
model.eval()
model = ipex.optimize(model, dtype=dtype, level="O1")
# conv_bn_folding is disabled as it fails in symbolic tracing, resulting in ipex warnings
model = ipex.optimize(model, dtype=dtype, level="O1", conv_bn_folding=False)
else:
if not model.training:
model.train()