better implicit function #channels errors

Summary: More helpful errors when the output channels aren't 1 for density and 3 for color

Reviewed By: shapovalov

Differential Revision: D40341088

fbshipit-source-id: 6074bf7fefe11c8e60fee4db2760b776419bcfee
This commit is contained in:
Jeremy Reizenstein
2022-10-13 05:43:36 -07:00
committed by Facebook GitHub Bot
parent 17bc043a0c
commit a607dd063e
2 changed files with 6 additions and 0 deletions

View File

@@ -215,6 +215,7 @@ def _check_raymarcher_inputs(
if density_1d and rays_densities.shape[-1] != 1:
raise ValueError(
"The size of the last dimension of rays_densities has to be one."
+ f" Got shape {rays_densities.shape}."
)
rays_shape = rays_densities.shape[:-1]