Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Apr 8, 2024
1 parent 0ee83cd commit 7c59b96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sota-implementations/dreamer/dreamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def main(cfg: "DictConfig"): # noqa: F821

print('Compiling')
def compile_rssms(module):
if isinstance(module, RSSMRollout):
if isinstance(module, RSSMRollout) and not getattr(module, "_compiled", False):
module._compiled = True
module.rssm_prior = torch.compile(module.rssm_prior)
module.rssm_posterior = torch.compile(module.rssm_posterior)
world_model_loss.apply(compile_rssms)
Expand Down

0 comments on commit 7c59b96

Please sign in to comment.