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

docopt #45

Open
siinem opened this issue Nov 16, 2018 · 2 comments
Open

docopt #45

siinem opened this issue Nov 16, 2018 · 2 comments

Comments

@siinem
Copy link

siinem commented Nov 16, 2018

Hi to all!
I have never used docopt package before. To be able to execute the train.py file, which argument should I input to docstr variable? Im getting an error at "args = docopt(docstr, version='v0.1')"

The error I get is as belows:

  File "/media/sinem/LENOVO/deeplab-resnet-pytorch/train.py", line 41, in <module>
    args = docopt(docstr, version='v0.1')
  File "/usr/local/lib/python2.7/dist-packages/docopt.py", line 558, in docopt
    DocoptExit.usage = printable_usage(doc)
  File "/usr/local/lib/python2.7/dist-packages/docopt.py", line 468, in printable_usage
    raise DocoptLanguageError('"usage:" (case-insensitive) not found.')
docopt.DocoptLanguageError: "usage:" (case-insensitive) not found. 

Do you have a suggestion on how i can solve this?

I installed the latest version: docopt-0.6.2.tar.gz

Cheers,
sinem.

@siinem
Copy link
Author

siinem commented Nov 16, 2018

its ok now.. the reason was i put the following lines in the original code as comment.

@siinem siinem closed this as completed Nov 16, 2018
@siinem siinem reopened this Nov 16, 2018
@siinem siinem changed the title docopt version docopt Nov 16, 2018
@siinem
Copy link
Author

siinem commented Nov 16, 2018

Could anyone write the arguments emplpyed from command line (specialized for docopt usage)? executing train.py outputs

Usage: 
    train.py [options]
Options:
    -h, --help                  Print this message
    --GTpath = <str>              Ground truth path prefix [default: data/gt/]
    --IMpath=<str>              Sketch images path prefix [default: data/img/]
    --NoLabels=<int>            The number of different labels in training data, VOC has 21 labels, including background [default: 21]
    --LISTpath=<str>            Input image number list file [default: data/list/train_aug.txt]
    --lr=<float>                Learning Rate [default: 0.00025]
    -i, --iterSize=<int>        Num iters to accumulate gradients over [default: 10]
    --wtDecay=<float>           Weight decay during training [default: 0.0005]
    --gpu0=<int>                GPU number [default: 0]
    --maxIter=<int>             Maximum number of iterations [default: 20000]

Is it possible to debug the code when docopt is used?

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

1 participant