MCPcopy Create free account
hub / github.com/3DTopia/DynamicCity / forward

Method forward

dynamic_city/vae/encoder.py:42–52  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

40 )
41
42 def forward(self, x):
43 x = x.detach().clone() # B, T, X, Y, Z
44 x = self.embedding(x) # B, T, X, Y, Z, C
45 t_vox = None
46 if self.separate_t_encoder:
47 t_vox = self.vox_convs(x, self.t_encoder, one_hot=self.conf.model.one_hot_time)
48 x = self.vox_convs(x, self.voxel_encoder)
49 x = self.vox_to_planes(x, t_vox)
50 for i, downsampler in enumerate(self.downsamplers):
51 x[i] = self.downsamplers[i](x[i])
52 return x
53
54 def vox_convs(self, x, encoder, one_hot=False):
55 B, T, X, Y, Z, C = x.shape

Callers

nothing calls this directly

Calls 2

vox_convsMethod · 0.95
vox_to_planesMethod · 0.95

Tested by

no test coverage detected