AssertionError: Invalid type <class 'NoneType'> for key WEIGHT_DECAY_BIAS
See original GitHub issueHi,
WEIGHT_DECAY_BIAS parameter in detectron2/config/defaults.py
that exists for Detectron v1 training causes the mentioned error when you try to import the file. If you change the None value with 0 (line 560), the bug seems to be fixed but I am not sure if that change breaks something else.
Instructions To Reproduce the 🐛 Bug:
- In a Python terminal:
from detectron2.config import configurable
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/storage/miniconda/envs/myenv/lib/python3.9/site-packages/detectron2/config/__init__.py", line 2, in <module>
from .compat import downgrade_config, upgrade_config
File "/storage/miniconda/envs/myenv/lib/python3.9/site-packages/detectron2/config/compat.py", line 28, in <module>
from .defaults import _C
File "/storage/miniconda/envs/myenv/lib/python3.9/site-packages/detectron2/config/defaults.py", line 560, in <module>
_C.SOLVER.WEIGHT_DECAY_BIAS = None # None means following WEIGHT_DECAY
File "/storage/miniconda/envs/myenv/lib/python3.9/site-packages/fvcore/common/config.py", line 148, in __setattr__
super().__setattr__(name, val)
File "/storage/miniconda/envs/myenv/lib/python3.9/site-packages/yacs/config.py", line 155, in __setattr__
_assert_with_logging(
File "/storage/miniconda/envs/myenv/lib/python3.9/site-packages/yacs/config.py", line 521, in _assert_with_logging
assert cond, msg
AssertionError: Invalid type <class 'NoneType'> for key WEIGHT_DECAY_BIAS; valid types = {<class 'float'>, <class 'list'>, <class 'str'>, <class 'int'>, <class 'bool'>, <class 'tuple'>}
Environment:
I am using torch 1.10.0 with prebuilt detectron2 0.6 with CUDA 11.1. The mentioned codepiece still exists in the main branch, so I don’t think this is related with my environment.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:8 (2 by maintainers)
Top Results From Across the Web
(Pytorch)AssertionError: Invalid type <class 'NoneType'>
I tried to retrain LoFTR(2021 CVPR paper), but I have faced some bugs. I'm a newcomer of deep-learning, please bear with me.
Read more >AssertionError: Invalid type <class 'NoneType'> for key ...
TypeError: Fetch argument None has invalid type <class 'NoneType'> 错误代码: import tensorflow as tf merged = tf.summary.merge_all() ...
Read more >How do i figure out what's wrong with an invalid type error?
I'm getting the following error with my model. ValueError: Invalid type provided to write_stan_json for key 'cl_pure_premium' as part of ...
Read more >Invalid constant scalar expression: <class 'NoneType'> - 综合 ...
Vector([fragCoord_x, fragCoord_y]) ) if __name__ == "__main__": gui = ti.GUI("Julia Quaternion 3", pixels.shape) makeIChannel0() iTime[None] ...
Read more >ValueError: Unexpected grad_sample type: <class 'NoneType ...
Hello, I am using PyTorch 1.10.0+cu102 and Opacus 1.0.0 and would like to use differential privacy for the training of an image classifier....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@zhao-yiqun try following in your environment:
For some reason, upgrading yacs alone was not sufficient for me.
Hey, I solved it by updating yacs to >= 0.1.8.