mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-02 13:59:10 +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,
|
device=device,
|
||||||
)
|
)
|
||||||
|
|
||||||
indices = (
|
indices = (
|
||||||
indices.view(sub_bs, 1, 1, 3)
|
indices.view(sub_bs, 1, 1, 3)
|
||||||
.broadcast_to(sub_bs, self.config.patch_size, self.config.patch_size, 3)
|
.broadcast_to(sub_bs, self.config.patch_size, self.config.patch_size, 3)
|
||||||
.clone()
|
.clone()
|
||||||
)
|
)
|
||||||
|
|
||||||
yys, xxs = torch.meshgrid(
|
yys, xxs = torch.meshgrid(
|
||||||
torch.arange(self.config.patch_size, device=device), torch.arange(self.config.patch_size, device=device)
|
torch.arange(self.config.patch_size, device=device), torch.arange(self.config.patch_size, device=device)
|
||||||
)
|
)
|
||||||
indices[:, ..., 1] += yys
|
indices[:, ..., 1] += yys
|
||||||
indices[:, ..., 2] += xxs
|
indices[:, ..., 2] += xxs
|
||||||
|
|
||||||
indices = torch.floor(indices).long()
|
indices = torch.floor(indices).long()
|
||||||
indices = indices.flatten(0, 2)
|
indices = indices.flatten(0, 2)
|
||||||
|
|
||||||
return indices
|
return indices
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user