segmenter icon indicating copy to clipboard operation
segmenter copied to clipboard

Unexpected keyword `mlp_ratio` running `seg_base_deit_mask`

Open zroach opened this issue 4 years ago • 0 comments

First of all, excellent repo - thanks very much for the awesome contribution to the ml community!

When running running eval on seg_base_deit_mask (via python -m segm.eval.miou checkpoints/seg_base_deit_mask/checkpoint.pth ade20k --multiscale), I am getting an error:

Starting process with rank 0...
Process 0 is connected.
All processes are connected.
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/.../segmenter/segm/eval/miou.py", line 279, in <module>
    main()
  File "/home/.../segmenter/pyenv/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/.../segmenter/pyenv/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/.../segmenter/pyenv/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/.../segmenter/pyenv/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/.../segmenter/segm/eval/miou.py", line 226, in main
    model, variant = load_model(model_path)
  File "/home/.../segmenter/segm/model/factory.py", line 119, in load_model
    model = create_segmenter(net_kwargs)
  File "/home/.../segmenter/segm/model/factory.py", line 106, in create_segmenter
    encoder = create_vit(model_cfg)
  File "/home/.../segmenter/segm/model/factory.py", line 67, in create_vit
    model = VisionTransformer(**model_cfg)
TypeError: __init__() got an unexpected keyword argument 'mlp_ratio'

This is happening with both single and multi scale. This seems to be stemming from the mlp_ratio key in the located in the yml config.

As I keep poking around, if I find a solution I'll submit a PR.

Thanks again for the repo :+1:

zroach avatar Dec 17 '21 22:12 zroach