Update imitation version

This commit is contained in:
ebuehrle
2021-09-14 18:02:56 +02:00
parent 763a7bb0d3
commit 40da84393c

View File

@@ -63,10 +63,16 @@ class NormalizedIntersimpleExpert(IntersimpleExpert):
action, _ = super().predict(*args, **kwargs) action, _ = super().predict(*args, **kwargs)
return self._intersimple._normalize(action), None return self._intersimple._normalize(action), None
class DummyVecEnvPolicy(): class DummyVecEnvPolicy(BasePolicy):
def __init__(self, experts): def __init__(self, experts):
self._experts = [e() for e in experts] self._experts = [e() for e in experts]
def forward(self, *args, **kwargs):
raise NotImplementedError()
def _predict(self, *args, **kwargs):
raise NotImplementedError()
def predict(self, *args, **kwargs): def predict(self, *args, **kwargs):
predictions = [e.predict() for e in self._experts] predictions = [e.predict() for e in self._experts]