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

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

Open
zeyuanyin opened this issue Oct 10, 2023 · 0 comments
Open

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

zeyuanyin opened this issue Oct 10, 2023 · 0 comments

Comments

@zeyuanyin
Copy link

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant