In function "batchify_rays" from the code, you put 'z_vals' in "render_rays" with shape (N_rays, ~) while the chunked 'ray_batch' has the shape of (chunk, ~). Therefore, an error occurs with the issue of size mismatch at the line "pts = rays_o[...,None,:] + rays_d[...,None,:] * z_vals[...,:,None]" in 'render_rays'
In function "batchify_rays" from the code, you put 'z_vals' in "render_rays" with shape (N_rays, ~) while the chunked 'ray_batch' has the shape of (chunk, ~). Therefore, an error occurs with the issue of size mismatch at the line "pts = rays_o[...,None,:] + rays_d[...,None,:] * z_vals[...,:,None]" in 'render_rays'