phosa/utils/nmr_renderer.py [35:53]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ):
        if vertices.ndimension() == 2:
            vertices = vertices.unsqueeze(0)
        if faces.ndimension() == 2:
            faces = faces.unsqueeze(0)
        if textures is None:
            textures = torch.ones(
                len(faces),
                faces.shape[1],
                self.t_size,
                self.t_size,
                self.t_size,
                3,
                dtype=torch.float32,
            ).cuda()
            color = torch.FloatTensor(colors[color_name]).cuda()
            textures = color * textures
        elif textures.ndimension() == 5:
            textures = textures.unsqueeze(0)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



phosa/utils/nmr_renderer.py [132:152]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ):
        # Batch currently not supported.
        # TODO(@jason): to add batch, just allow for multiple images.
        if vertices.ndimension() == 2:
            vertices = vertices.unsqueeze(0)
        if faces.ndimension() == 2:
            faces = faces.unsqueeze(0)
        if textures is None:
            textures = torch.ones(
                len(faces),
                faces.shape[1],
                self.t_size,
                self.t_size,
                self.t_size,
                3,
                dtype=torch.float32,
            ).cuda()
            color = torch.FloatTensor(colors[color_name]).cuda()
            textures = color * textures
        elif textures.ndimension() == 5:
            textures = textures.unsqueeze(0)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



