mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-11 18:44:21 +08:00
revert changes
This commit is contained in:
1 parent
00b81cce28
commit
4ac5fa8e61
1 file changed
+12
-12
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user