Modified crop_dataset_roi interface to automatically write the cropped parameters to a json file in the meta of the dataset

Co-authored-by: Adil Zouitine <adilzouitinegm@gmail.com>
This commit is contained in:
Michel Aractingi
2025-02-14 12:32:45 +01:00
committed by AdilZouitine
parent 2f34d84298
commit 2aca830a09
3 changed files with 38 additions and 16 deletions

View File

@@ -181,10 +181,10 @@ class ReplayBuffer:
state = {key: tensor.to(self.storage_device) for key, tensor in state.items()}
next_state = {key: tensor.to(self.storage_device) for key, tensor in next_state.items()}
action = action.to(self.storage_device)
if complementary_info is not None:
complementary_info = {
key: tensor.to(self.storage_device) for key, tensor in complementary_info.items()
}
# if complementary_info is not None:
# complementary_info = {
# key: tensor.to(self.storage_device) for key, tensor in complementary_info.items()
# }
if len(self.memory) < self.capacity:
self.memory.append(None)