MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / to

Method to

detrsmpl/core/renderer/torch3d_renderer/base_renderer.py:169–182  ·  view source on GitHub ↗
(self, device)

Source from the content-addressed store, hash-verified

167 self = self.to(self.device)
168
169 def to(self, device):
170 if isinstance(device, str):
171 device = torch.device(device)
172 self.device = device
173 if getattr(self.rasterizer, 'cameras', None) is not None:
174 self.rasterizer.cameras = self.rasterizer.cameras.to(device)
175
176 if getattr(self.shader, 'cameras', None) is not None:
177 self.shader.cameras = self.shader.cameras.to(device)
178 if getattr(self.shader, 'materials', None) is not None:
179 self.shader.materials = self.shader.materials.to(device)
180 if getattr(self.shader, 'lights', None) is not None:
181 self.shader.lights = self.shader.lights.to(device)
182 return self
183
184 def _set_output_path(self, output_path):
185 if output_path is not None:

Callers 1

_init_rendererMethod · 0.95

Calls 1

deviceMethod · 0.80

Tested by

no test coverage detected