bmild / nerf

Code release for NeRF (Neural Radiance Fields)
http://tancik.com/nerf
MIT License
9.58k stars 1.34k forks source link

The error of "Resource exhausted: OOM when allocating tensor with shape[3276800,90] ......" #145

Closed eloping closed 2 years ago

eloping commented 2 years ago

when running (python run_nerf.py --config config_fern.txt),I got the crush:

W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at concat_op.cc:153 : Resource exhausted: OOM when allocating tensor with shape[3276800,90] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
Traceback (most recent call last):
 File "run_nerf.py", line 928, in <module>
    train()
  File "run_nerf.py", line 893, in train
    **render_kwargs_test)
    .......
 File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[3276800,90] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc [Op:ConcatV2] name: concat

I tried to decreased N_rand in config_fern.txt ,but it doesn‘t work. It still crushed after fern_test 500 .Is this the right way to solve this problem ?