Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds multilabel efficientnet #278

Merged
merged 3 commits into from
Jun 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixes linting
  • Loading branch information
LashaO committed Jun 13, 2024
commit d920cce12c870e91d3ff21ab574f961d8555c283
4 changes: 2 additions & 2 deletions wbia/algo/detect/efficientnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def __init__(self, n_class, model_arch='tf_efficientnet_b4_ns', pretrained=False
if n_class is not None:
n_features = self.model.classifier.in_features
self.model.classifier = nn.Linear(n_features, n_class)

else:
self.model.classifier = nn.Identity(n_features, n_class)
'''
Expand All @@ -179,7 +179,7 @@ def __init__(self, n_class, model_arch='tf_efficientnet_b4_ns', pretrained=False
nn.Linear(n_features, n_class, bias=True)
)
'''

def process_row(self, row_labels, preds, sort_weights, labels):
multi_labels = labels[row_labels.astype(bool)]
preds = preds[row_labels.astype(bool)]
Expand Down
Loading