Skip to content

Commit

Permalink
Use eval() instead of train(False)
Browse files Browse the repository at this point in the history
  • Loading branch information
Darwinkel committed Apr 2, 2024
1 parent 8bfb719 commit 7dcb6b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shepardtts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ def load_checkpoint() -> ShepardXtts:
use_deepspeed=use_deepspeed,
)
model.to(settings.DEVICE)
model.eval()

if settings.DEVICE == "cpu":
import intel_extension_for_pytorch as ipex

model.train(mode=False)
model = ipex.optimize(model, weights_prepack=False, dtype=torch.float16)
model = torch.compile(model, backend="ipex")

Expand Down

0 comments on commit 7dcb6b2

Please sign in to comment.