Wrong inputs arguments?
cassiePython opened this issue · 1 comments
Thanks for sharing your code, I try to run your code but found the following issue:
Camera Pose: (20, 4, 4)
Global Step: 0 Origin Step: 200
Origin Train
Traceback (most recent call last):
File "run_stylenerf.py", line 610, in
train(args=args)
File "run_stylenerf.py", line 587, in train
Origin_train(global_step)
File "run_stylenerf.py", line 309, in Origin_train
pts_fine, ts_fine = samp_func_fine(rays_o, rays_d, ts, weights, args.N_samples_fine)
File "/home/ma-user/work/wangcan/StylizedNeRF/utils.py", line 578, in sampling_pts_fine_jt
t_samples = sample_pdf(ts_mid, weights[..., 1:-1], N_samples_fine, det=True)
File "/home/ma-user/work/wangcan/StylizedNeRF/utils.py", line 615, in sample_pdf
a = denom.where(denom < 1e-5)
RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.where)).
Types of your inputs are:
self = Var,
args = (Var, ),
Can you do me a favor?
Hi. You must have changed the code because lines 614-616 should be
cond = jt.where(denom < 1e-5)
denom[cond[0], cond[1]] = 1.
t = (u-cdf_g[..., 0]) / denom
Your code a = denom.where(denom < 1e-5)
should be rewritten as a = jt.where(denom < 1e-5)
. For more detailed usage of jittor API, please refer to Jittor.