From 4ac5fa8e6115a143f6e22b7d90d7cec5bbdd8ef0 Mon Sep 17 00:00:00 2001 From: Ethan Weber Date: Fri, 4 Aug 2023 15:23:55 +0000 Subject: [PATCH] revert changes --- nerfstudio/data/pixel_samplers.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/nerfstudio/data/pixel_samplers.py b/nerfstudio/data/pixel_samplers.py index 1bb7130b9..3703925aa 100644 --- a/nerfstudio/data/pixel_samplers.py +++ b/nerfstudio/data/pixel_samplers.py @@ -329,20 +329,20 @@ class PatchPixelSampler(PixelSampler): device=device, ) - indices = ( - indices.view(sub_bs, 1, 1, 3) - .broadcast_to(sub_bs, self.config.patch_size, self.config.patch_size, 3) - .clone() - ) + indices = ( + indices.view(sub_bs, 1, 1, 3) + .broadcast_to(sub_bs, self.config.patch_size, self.config.patch_size, 3) + .clone() + ) - yys, xxs = torch.meshgrid( - torch.arange(self.config.patch_size, device=device), torch.arange(self.config.patch_size, device=device) - ) - indices[:, ..., 1] += yys - indices[:, ..., 2] += xxs + yys, xxs = torch.meshgrid( + torch.arange(self.config.patch_size, device=device), torch.arange(self.config.patch_size, device=device) + ) + indices[:, ..., 1] += yys + indices[:, ..., 2] += xxs - indices = torch.floor(indices).long() - indices = indices.flatten(0, 2) + indices = torch.floor(indices).long() + indices = indices.flatten(0, 2) return indices