Skip to content

Commit

Permalink
Change DDRNet Head Output Dtype (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlov721 authored Oct 3, 2024
1 parent ca9ab66 commit 6a6f2db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions luxonis_train/nodes/heads/ddrnet_segmentation_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ def __init__(
)

def forward(self, inputs: Tensor) -> Tensor:
x = self.relu(self.bn1(inputs))
x: Tensor = self.relu(self.bn1(inputs))
x = self.conv1(x)
x = self.relu(self.bn2(x))
x = self.conv2(x)
x = self.upscale(x)
if self.export:
return x.argmax(dim=1)
return x.argmax(dim=1).to(dtype=torch.int32)
return x

def set_export_mode(self, mode: bool = True) -> None:
Expand Down

0 comments on commit 6a6f2db

Please sign in to comment.