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

AssertionError: Invalid type #37

Open
Jasonshao0123 opened this issue Sep 27, 2021 · 2 comments · May be fixed by #121
Open

AssertionError: Invalid type #37

Jasonshao0123 opened this issue Sep 27, 2021 · 2 comments · May be fixed by #121

Comments

@Jasonshao0123
Copy link

When I run python tools/demo.py --source ./inference/images/street.jpg
it appeared:
Traceback (most recent call last):
File "tools/demo.py", line 21, in
from lib.config import cfg
File "/home/zzj/Projects/YOLOP/lib/config/init.py", line 1, in
from .default import _C as cfg
File "/home/zzj/Projects/YOLOP/lib/config/default.py", line 38, in
_C.LOSS.MULTI_HEAD_LAMBDA = None
File "/home/zzj/anaconda3/envs/yolov5/lib/python3.8/site-packages/yacs/config.py", line 155, in setattr
_assert_with_logging(
File "/home/zzj/anaconda3/envs/yolov5/lib/python3.8/site-packages/yacs/config.py", line 521, in _assert_with_logging
assert cond, msg
AssertionError: Invalid type <class 'NoneType'> for key MULTI_HEAD_LAMBDA; valid types = {<class 'list'>, <class 'tuple'>, <class 'int'>, <class 'bool'>, <class 'str'>, <class 'float'>}

I changed the image name .The new name is 'street'.
我实在没能自己解决,麻烦作者看下是哪里出现了问题,应该如何解决呢?

@PigLogic-Cyber
Copy link

Try to change '_C.LOSS.MULTI_HEAD_LAMBDA = None' to be '_C.LOSS.MULTI_HEAD_LAMBDA = False', works for me, good luck :-)

@Jasonshao0123
Copy link
Author

Try to change '_C.LOSS.MULTI_HEAD_LAMBDA = None' to be '_C.LOSS.MULTI_HEAD_LAMBDA = False', works for me, good luck :-)

thanks 发现是torch版本没对

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

Successfully merging a pull request may close this issue.

2 participants