Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Missing "resnet50w5" linear config in eval_linear.py #121

Description

@zeyuanyin

It seems that "resnet50w5" is missing from this conditional statement.

swav/eval_linear.py

Lines 229 to 249 in 06b1b7c

class RegLog(nn.Module):
"""Creates logistic regression on top of frozen features"""
def __init__(self, num_labels, arch="resnet50", global_avg=False, use_bn=True):
super(RegLog, self).__init__()
self.bn = None
if global_avg:
if arch == "resnet50":
s = 2048
elif arch == "resnet50w2":
s = 4096
elif arch == "resnet50w4":
s = 8192
self.av_pool = nn.AdaptiveAvgPool2d((1, 1))
else:
assert arch == "resnet50"
s = 8192
self.av_pool = nn.AvgPool2d(6, stride=1)
if use_bn:
self.bn = nn.BatchNorm2d(2048)
self.linear = nn.Linear(s, num_labels)

if global_avg:
  if arch == "resnet50":
      s = 2048
  elif arch == "resnet50w2":
      s = 4096
  elif arch == "resnet50w4":
      s = 8192
  elif arch == "resnet50w5":  # add
      s = 10240               # add

Can you please confirm it?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions