Skip to content

Commit

Permalink
Add sigmoid
Browse files Browse the repository at this point in the history
  • Loading branch information
HonzaCuhel committed Nov 18, 2024
1 parent 13663ed commit 8216fce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion luxonis_train/nodes/heads/ddrnet_segmentation_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ def forward(self, inputs: Tensor) -> Tensor:
x = self.conv2(x)
x = self.upscale(x)
if self.export:
x = x.argmax(dim=1) if self.n_classes > 1 else (x > 0)
x = x.argmax(dim=1) if self.n_classes > 1 else torch.sigmoid(x) > 0.5
return x.to(dtype=torch.int32)
return x

0 comments on commit 8216fce

Please sign in to comment.