MCPcopy Create free account
hub / github.com/Sin3DM/Sin3DM / __init__

Method __init__

evaluation/classifier3D.py:7–32  ·  view source on GitHub ↗
(self, ef_dim=32, z_dim=512, class_num=24, voxel_size=128)

Source from the content-addressed store, hash-verified

5
6class classifier(nn.Module):
7 def __init__(self, ef_dim=32, z_dim=512, class_num=24, voxel_size=128):
8 super(classifier, self).__init__()
9 self.ef_dim = ef_dim
10 self.z_dim = z_dim
11 self.class_num = class_num
12 self.voxel_size = voxel_size
13
14 self.conv_1 = nn.Conv3d(1, self.ef_dim, 4, stride=2, padding=1, bias=True)
15 self.bn_1 = nn.InstanceNorm3d(self.ef_dim)
16
17 self.conv_2 = nn.Conv3d(self.ef_dim, self.ef_dim*2, 4, stride=2, padding=1, bias=True)
18 self.bn_2 = nn.InstanceNorm3d(self.ef_dim*2)
19
20 self.conv_3 = nn.Conv3d(self.ef_dim*2, self.ef_dim*4, 4, stride=2, padding=1, bias=True)
21 self.bn_3 = nn.InstanceNorm3d(self.ef_dim*4)
22
23 self.conv_4 = nn.Conv3d(self.ef_dim*4, self.ef_dim*8, 4, stride=2, padding=1, bias=True)
24 self.bn_4 = nn.InstanceNorm3d(self.ef_dim*8)
25
26 self.conv_5 = nn.Conv3d(self.ef_dim*8, self.z_dim, 4, stride=2, padding=1, bias=True)
27
28 if self.voxel_size==256:
29 self.bn_5 = nn.InstanceNorm3d(self.z_dim)
30 self.conv_5_2 = nn.Conv3d(self.z_dim, self.z_dim, 4, stride=2, padding=1, bias=True)
31
32 self.linear1 = nn.Linear(self.z_dim, self.class_num, bias=True)
33
34 def forward(self, inputs, out_layer=None, is_training=False):
35 out = inputs

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected