Skip to content

Commit

Permalink
replace torchsearchsorted with inbuilt call
Browse files Browse the repository at this point in the history
  • Loading branch information
WillBrennan committed Apr 21, 2021
1 parent f38216f commit 19a66af
Show file tree
Hide file tree
Showing 19 changed files with 1 addition and 911 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ This project is a faithful PyTorch implementation of [NeRF](http://www.matthewta
git clone https://github.com/yenchenlin/nerf-pytorch.git
cd nerf-pytorch
pip install -r requirements.txt
cd torchsearchsorted
pip install .
cd ../
```

<details>
Expand Down
5 changes: 1 addition & 4 deletions run_nerf_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
import torch.nn.functional as F
import numpy as np

# TODO: remove this dependency
from torchsearchsorted import searchsorted


# Misc
img2mse = lambda x, y : torch.mean((x - y) ** 2)
Expand Down Expand Up @@ -223,7 +220,7 @@ def sample_pdf(bins, weights, N_samples, det=False, pytest=False):

# Invert CDF
u = u.contiguous()
inds = searchsorted(cdf, u, side='right')
inds = torch.searchsorted(cdf, u, right=True)
below = torch.max(torch.zeros_like(inds-1), inds-1)
above = torch.min((cdf.shape[-1]-1) * torch.ones_like(inds), inds)
inds_g = torch.stack([below, above], -1) # (batch, N_samples, 2)
Expand Down
158 changes: 0 additions & 158 deletions torchsearchsorted/.gitignore

This file was deleted.

29 changes: 0 additions & 29 deletions torchsearchsorted/LICENSE

This file was deleted.

89 changes: 0 additions & 89 deletions torchsearchsorted/README.md

This file was deleted.

71 changes: 0 additions & 71 deletions torchsearchsorted/examples/benchmark.py

This file was deleted.

Loading

0 comments on commit 19a66af

Please sign in to comment.