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

TypeError: __init__() got an unexpected keyword argument 'global_pool' #376

Closed
aribornstein opened this issue Jun 8, 2021 · 1 comment · Fixed by #377
Closed

TypeError: __init__() got an unexpected keyword argument 'global_pool' #376

aribornstein opened this issue Jun 8, 2021 · 1 comment · Fixed by #377
Assignees
Labels
bug / fix Something isn't working help wanted Extra attention is needed Priority
Milestone

Comments

@aribornstein
Copy link
Contributor

🐛 Bug

Flash backbones is hardcoding the global_pool argument but this isn't relevant for Visual Transformer backbones and causes them to crash

TypeError: __init__() got an unexpected keyword argument 'global_pool'

To Reproduce

model = ImageClassifier(backbone="vit_small_patch16_224", num_classes=10, serializer=Labels())

Expected behavior

global_pool should only be passed if expected model backbone should initialize and not crash

Environment

  • PyTorch Version (e.g., 1.0):
  • OS (e.g., Linux):
  • How you installed PyTorch (conda, pip, source):
  • Build command you used (if compiling from source):
  • Python version:
  • CUDA/cuDNN version:
  • GPU models and configuration:
  • Any other relevant information:

Additional context

@aribornstein aribornstein added bug / fix Something isn't working help wanted Extra attention is needed labels Jun 8, 2021
@ethanwharris ethanwharris added this to the 0.3.1 milestone Jun 8, 2021
@ethanwharris
Copy link
Collaborator

Closed by #377

@ethanwharris ethanwharris mentioned this issue Jun 8, 2021
8 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug / fix Something isn't working help wanted Extra attention is needed Priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants