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

Custom Swin Transformer: error: unrecognized arguments #3

Closed
AliKayhanAtay opened this issue Nov 24, 2021 · 1 comment
Closed

Custom Swin Transformer: error: unrecognized arguments #3

AliKayhanAtay opened this issue Nov 24, 2021 · 1 comment

Comments

@AliKayhanAtay
Copy link

parser = argparse.ArgumentParser('Custom Swin Transformer')

parser.add_argument(
'--cfg',
type=str,
metavar="FILE",
help='/content/Swin-Transformer-Tensorflow/configs/swin_tiny_patch4_window7_224.yaml',
default="CUSTOM_YAML_FILE_PATH"
)
parser.add_argument(
'--resume',
type=int,
help=1,
choices={0, 1},
default=1,
)
parser.add_argument(
'--weights_type',
type=str,
help='imagenet_22k',
choices={"imagenet_1k", "imagenet_22k", "imagenet_22kto1k"},
default="imagenet_1k",
)

args = parser.parse_args()
custom_config = get_config(args, include_top=False)

i am trying to use it but it throws an error below

usage: Custom Swin Transformer [-h] [--cfg FILE] [--resume {0,1}]
[--weights_type {imagenet_22kto1k,imagenet_1k,imagenet_22k}]
Custom Swin Transformer: error: unrecognized arguments: -f /root/.local/share/jupyter/runtime/kernel-ee309a98-1f20-4bb7-aa12-c2980aea076c.json
An exception has occurred, use %tb to see the full traceback.

SystemExit: 2

@DHdroid
Copy link
Collaborator

DHdroid commented Jan 26, 2022

Can you give us a more detailed description?
If you're running your code on jupyter, I recommend you follow this to use argparse.

@DHdroid DHdroid closed this as completed Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants