mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-01 02:31:11 +06:00
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:
parent
802b98c72b
commit
fdffee8a60
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user