MCPcopy Create free account
hub / github.com/Zhiyuan-R/Tiger-Diffusion / forward

Method forward

modules/pointnet.py:80–90  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

78 self.mlps = nn.ModuleList(mlps)
79
80 def forward(self, inputs):
81 features, coords, temb = inputs
82 centers_coords = F.furthest_point_sample(coords, self.num_centers)
83 features_list = []
84 for grouper, mlp in zip(self.groupers, self.mlps):
85 features, temb = mlp(grouper(coords, centers_coords, temb, features))
86 features_list.append(features.max(dim=-1).values)
87 if len(features_list) > 1:
88 return features_list[0], centers_coords, temb.max(dim=-1).values if temb.shape[1] > 0 else temb
89 else:
90 return features_list[0], centers_coords, temb.max(dim=-1).values if temb.shape[1] > 0 else temb
91
92 def extra_repr(self):
93 return f'num_centers={self.num_centers}, out_channels={self.out_channels}'

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected