(self, feat)
| 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) |