fix more bugs in normalization
This commit is contained in:
@@ -54,7 +54,7 @@ class AbstractExperienceReplay(TensorDictReplayBuffer):
|
||||
return {
|
||||
("observation", "state"): "b c -> 1 c",
|
||||
("observation", "image"): "b c h w -> 1 c 1 1",
|
||||
"action": "b c -> 1 c",
|
||||
("action",): "b c -> 1 c",
|
||||
}
|
||||
|
||||
@property
|
||||
@@ -73,8 +73,12 @@ class AbstractExperienceReplay(TensorDictReplayBuffer):
|
||||
def num_episodes(self) -> int:
|
||||
return len(self._storage._storage["episode"].unique())
|
||||
|
||||
@property
|
||||
def transform(self):
|
||||
return self._transform
|
||||
|
||||
def set_transform(self, transform):
|
||||
self.transform = transform
|
||||
self._transform = transform
|
||||
|
||||
def compute_or_load_stats(self, num_batch=100, batch_size=32) -> TensorDict:
|
||||
stats_path = self.data_dir / "stats.pth"
|
||||
|
||||
Reference in New Issue
Block a user