MCPcopy Create free account
hub / github.com/3DAnimals/3DAnimals / forward

Method forward

visualization/visualize_results_fauna.py:69–74  ·  view source on GitHub ↗
(self, feat)

Source from the content-addressed store, hash-verified

67 or isinstance(self.amb, int))
68
69 def forward(self, feat):
70 batch_size = feat.shape[0]
71 if self.is_hacking:
72 return torch.concat([self.light_dir, self.amb, self.diff], -1)
73 else:
74 return torch.concat([self.light_dir, torch.FloatTensor([self.amb, self.diff]).to(self.light_dir.device)], -1).expand(batch_size, -1)
75
76 def shade(self, feat, kd, normal):
77 light_params = self.forward(feat)

Callers 1

shadeMethod · 0.95

Calls 1

toMethod · 0.45

Tested by

no test coverage detected