Fixes for Plan2Explore with actions and for windows.

This commit is contained in:
ktolnos
2023-06-05 22:50:12 +03:00
parent 308eeff09a
commit b07badeee6
2 changed files with 5 additions and 8 deletions

View File

@@ -55,10 +55,10 @@ class Dreamer(nn.Module):
self._task_behavior = models.ImagBehavior(
config, self._wm, config.behavior_stop_grad
)
if config.compile:
if config.compile and os.name != 'nt': # compilation is not supported on windows
self._wm = torch.compile(self._wm)
self._task_behavior = torch.compile(self._task_behavior)
reward = lambda f, s, a: self._wm.heads["reward"](f).mean
reward = lambda f, s, a: self._wm.heads["reward"](f).mean()
self._expl_behavior = dict(
greedy=lambda: self._task_behavior,
random=lambda: expl.Random(config, act_space),