pynif3d.renderer¶
- class pynif3d.renderer.PointRenderer(chunk_size=None)¶
Bases:
torch.nn.modules.module.Module
The function that is used for rendering each sampled point using the NIF model.
Usage:
# Assume that a NIF model (torch.nn.Module) is given. renderer = PointRenderer(chunk_size=256) prediction = renderer(nif_model)
- Parameters
chunk_size (int) – The chunk size of the tensor that is passed for NIF prediction.
- forward(nif_model, *args)¶
- Parameters
nif_model (torch.nn.Module) – NIF model for outputting the prediction.
args (list, tuple) – Tuple or list containing the tensors that are passed through the NIF model.
- Returns
Tensor containing the concatenated predictions.
- Return type
torch.Tensor
- training: bool¶