Comments (7)
Hi, could you provide more details? e.g. a minimal reproducible code example?
From the screenshot, I can only guess that you seem to try to backward through composite_rays
, which should only be used at inference?
from torch-ngp.
from torch-ngp.
@Dengzhi-USTC Are you using the latest version? I cannot reproduce the error...
$ python main_nerf.py data/fox/ --workspace trial_nerf --fp16 --ff --cuda_ray
Namespace(path='data/fox/', test=False, workspace='trial_nerf', seed=0, num_rays=4096, cuda_ray=True, num_steps=128, upsample_steps=128, max_ray_batch=4096, fp16=True, ff=True, tcnn=False, mode='colmap',
preload=False, bound=2, scale=0.33, gui=False, W=800, H=800, radius=5, fovy=90, max_spp=64)
NeRFNetwork(
(encoder): HashEncoder: input_dim=3 num_levels=16 level_dim=2 base_resolution=16 per_level_scale=1.4472692374403782 params=(6328829, 2)
(sigma_net): FFMLP: input_dim=32 output_dim=16 hidden_dim=64 num_layers=2 activation=0
(encoder_dir): SHEncoder: input_dim=3 degree=4
(color_net): FFMLP: input_dim=32 output_dim=3 hidden_dim=64 num_layers=3 activation=0
)
[INFO] Trainer: ngp | 2022-03-16_10-23-47 | cuda:0 | fp16 | trial_nerf
[INFO] #parameters: 12676090
[INFO] Loading latest checkpoint ...
[WARN] No checkpoint found, model randomly initialized.
==> Start Training Epoch 1, lr=0.010000 ...
loss=0.0157 (0.0188): : 100% 49/49 [00:01<00:00, 40.71it/s]
==> Finished Epoch 1.
==> Start Training Epoch 2, lr=0.010000 ...
loss=0.0207 (0.0228): : 100% 49/49 [00:01<00:00, 41.23it/s]
==> Finished Epoch 2.
==> Start Training Epoch 3, lr=0.010000 ...
loss=0.0126 (0.0134): : 100% 49/49 [00:02<00:00, 21.19it/s]
==> Finished Epoch 3.
==> Start Training Epoch 4, lr=0.010000 ...
loss=0.0071 (0.0076): : 100% 49/49 [00:02<00:00, 22.08it/s]
==> Finished Epoch 4.
==> Start Training Epoch 5, lr=0.010000 ...
loss=0.0040 (0.0059): : 100% 49/49 [00:02<00:00, 21.86it/s]
==> Finished Epoch 5.
==> Start Training Epoch 6, lr=0.010000 ...
loss=0.0045 (0.0046): : 100% 49/49 [00:02<00:00, 21.84it/s]
==> Finished Epoch 6.
==> Start Training Epoch 7, lr=0.010000 ...
loss=0.0035 (0.0048): : 100% 49/49 [00:02<00:00, 21.85it/s]
==> Finished Epoch 7.
==> Start Training Epoch 8, lr=0.010000 ...
loss=0.0034 (0.0042): : 100% 49/49 [00:02<00:00, 22.42it/s]
==> Finished Epoch 8.
==> Start Training Epoch 9, lr=0.010000 ...
loss=0.0051 (0.0032): : 100% 49/49 [00:02<00:00, 21.91it/s]
==> Finished Epoch 9.
==> Start Training Epoch 10, lr=0.010000 ...
loss=0.0017 (0.0029): : 100% 49/49 [00:02<00:00, 22.36it/s]
==> Finished Epoch 10.
++> Evaluate at epoch 10 ...
loss=0.0023 (0.0023): : 100% 1/1 [00:00<00:00, 1.18it/s]
PSNR = 22.404175
++> Evaluate epoch 10 Finished.
[INFO] New best result: None --> 0.0023169806227087975
==> Start Training Epoch 11, lr=0.010000 ...
loss=0.0022 (0.0027): : 100% 49/49 [00:02<00:00, 22.20it/s]
from torch-ngp.
Yes, i download the latest version.
I try this on the v100 and 3090.
The inference part also generate those problem.
from torch-ngp.
ok, i soved the problem, the vision of my torch is 1.08.
from torch-ngp.
@ashawkey Hi, about this strange phenomenon, I've found a simple workaround.
This seems to be caused by not explicitly giving the return value in class _composite_rays(Function)
.
I think it is better to manually adding a return value (for example, return tuple()
) to those functions not giving a return value, even if they aren't accessed at all. The same change should be applied to another function class _compact_rays(Function)
similarly. I think this is because a lower pytorch exists this bug which is fixed in a higher version.
By the way, about another suggestion. I also notice that it'd be great if you could remove all the indexing='ij'
in meshgrid
function so that your codes are compatible with a lower pytorch version (notice that ij
is already the default arguments and we could remove it).
from torch-ngp.
@Karbo123 Thanks for the solution! I will add it soon. As for the reason of using indexing='ij'
, it says the default behaviour will be changed in later pytorch versions. I'll write a condition to better support lower versions.
from torch-ngp.
Related Issues (20)
- GridEncoder can't handle empty positions
- hi, I have some questions when using 'test' mode after trained a model with custom data
- The value of `self.cascade` becomes 0 when `bound <= 0.5`, causing errors
- Interpolation in GridEncoder might be wrong? HOT 1
- Control Time in GUI for D-NeRF HOT 1
- Hi. I had a question about the dataloading step. Why does all the data need to be loaded in a single step. I am running out of GPU memory. Is it possible to do it in batches.
- Ambient Occlusion (AO) using the (Instant-NGP framework)
- fail to rebuild radiance field. such as fox, lego HOT 1
- ModuleNotFoundError: No module named '_raymarching' HOT 8
- OK. Thank you for your response!
- About environments! HOT 1
- ImportError: No module named '_hash_encoder'
- About GUI
- issues when build extensions:ERROR: Could not build wheels for raymarching, which is required to install pyproject.toml-based projects HOT 1
- CUDA 12
- D-NeRF does not perform well when running the HyperNeRF data set. Does it need to make some adjustments?
- A tip to use smpl camera data to use with torch-ngp? Which transformation do we use?
- build extension problem HOT 1
- This is strange, I haven't met this problem. Could you try to install some other packages that require building extensions? For example, `pip install torch-scatter` following [this](https://github.com/rusty1s/pytorch_scatter#from-source)?
- The growth process of `local_step` seems to have an issue.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torch-ngp.