(self, inputs, out_layer=None, is_training=False)
| 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 |
| 36 | |
| 37 | out = self.bn_1(self.conv_1(out)) |
| 38 | out = F.leaky_relu(out, negative_slope=0.01, inplace=True) |
| 39 | |
| 40 | if out_layer == 1: |
| 41 | return out |
| 42 | |
| 43 | out = self.bn_2(self.conv_2(out)) |
| 44 | out = F.leaky_relu(out, negative_slope=0.01, inplace=True) |
| 45 | |
| 46 | if out_layer == 2: |
| 47 | return out |
| 48 | |
| 49 | out = self.bn_3(self.conv_3(out)) |
| 50 | out = F.leaky_relu(out, negative_slope=0.01, inplace=True) |
| 51 | |
| 52 | if out_layer == 3: |
| 53 | return out |
| 54 | |
| 55 | out = self.bn_4(self.conv_4(out)) |
| 56 | out = F.leaky_relu(out, negative_slope=0.01, inplace=True) |
| 57 | |
| 58 | if out_layer == 4: |
| 59 | return out |
| 60 | |
| 61 | if self.voxel_size==256: |
| 62 | out = self.bn_5(out) |
| 63 | out = F.leaky_relu(out, negative_slope=0.01, inplace=True) |
| 64 | out = self.conv_5_2(out) |
| 65 | |
| 66 | z = F.adaptive_avg_pool3d(out, output_size=(1, 1, 1)) |
| 67 | z = z.view(-1,self.z_dim) |
| 68 | out = F.leaky_relu(z, negative_slope=0.01, inplace=True) |
| 69 | |
| 70 | out = self.linear1(out) |
| 71 | |
| 72 | return out, z |
nothing calls this directly
no outgoing calls
no test coverage detected