Skip to content

Commit

Permalink
Fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
BloodAxe committed Nov 21, 2024
1 parent 66e48d7 commit e4caad5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pytorch_toolbelt/losses/focal.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __repr__(self):
repr += f"reduced_threshold={self.reduced_threshold}, activation={self.activation}, "
repr += f"softmax_dim={self.softmax_dim},"
repr += f"class_weights={self.class_weights.tolist()}, "
repr += f")"
repr += ")"
return repr

def forward(self, inputs: Tensor, targets: Tensor) -> Tensor:
Expand Down
6 changes: 4 additions & 2 deletions pytorch_toolbelt/modules/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ class HasInputFeaturesSpecification(Protocol):
"""

@torch.jit.unused
def get_input_spec(self) -> FeatureMapsSpecification: ...
def get_input_spec(self) -> FeatureMapsSpecification:
...


class HasOutputFeaturesSpecification(Protocol):
Expand All @@ -70,7 +71,8 @@ class HasOutputFeaturesSpecification(Protocol):
"""

@torch.jit.unused
def get_output_spec(self) -> FeatureMapsSpecification: ...
def get_output_spec(self) -> FeatureMapsSpecification:
...


class AbstractEncoder(nn.Module, HasOutputFeaturesSpecification):
Expand Down

0 comments on commit e4caad5

Please sign in to comment.