Another small fix

This commit is contained in:
Jedrzej Kosinski 2025-08-13 18:27:57 -07:00
parent 19db0422f0
commit d4b79dd0f6

View File

@ -132,7 +132,7 @@ class IndexListContextHandler(ContextHandlerABC):
cond_item = actual_cond[key]
if isinstance(cond_item, torch.Tensor):
# check that tensor is the expected length - x.size(0)
if cond_item.ndim < self.dim and cond_item.size(self.dim) == x_in.size(self.dim):
if self.dim < cond_item.ndim and cond_item.size(self.dim) == x_in.size(self.dim):
# if so, it's subsetting time - tell controls the expected indeces so they can handle them
actual_cond_item = window.get_tensor(cond_item)
resized_actual_cond[key] = actual_cond_item.to(device)