fix static cache
This commit is contained in:
+2
-2
@@ -104,7 +104,7 @@ class StaticCache():
|
||||
return data
|
||||
|
||||
|
||||
def __getitem__(self, frame) -> dict:
|
||||
def __getitem__(self, frame: Frame) -> dict:
|
||||
if (frame.id, frame.garment) not in self.store:
|
||||
item = self.read(frame.id, frame.garment)
|
||||
stored_data = { key: torch.from_numpy(value).to('cpu') for key, value in item.items()}
|
||||
@@ -164,7 +164,7 @@ class DatasetCloth3D(torch.utils.data.Dataset):
|
||||
if self.cache is not None:
|
||||
if frame in self.cache.keys():
|
||||
data = { key: (value.to(self.device) if type(value) == torch.Tensor else value) for key, value in self.cache[frame].items()}
|
||||
data = { **data, **self.static_cache[frame.id] }
|
||||
data = { **data, **self.static_cache[frame] }
|
||||
return data
|
||||
|
||||
item = dict()
|
||||
|
||||
Reference in New Issue
Block a user