Skip to content

DCNv4.forward() takes 2 to 3 arguments, the function of self.dcn' argment count is 4 #103

@liuyun2025-netizen

Description

@liuyun2025-netizen

错误: DCNv4.forward() takes from 2 to 3 positional arguments but 4 were given Traceback (most recent call last): File "E:\AI\workspace\internimage_v4.py", line 1366, in main outputs = model(input_tensor) ^^^^^^^^^^^^^^^^^^^ File "E:\Python\Python311\Lib\site-packages\torch\nn\modules\module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Python\Python311\Lib\site-packages\torch\nn\modules\module.py", line 1762, in call_impl
return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\AI\workspace\internimage_v4.py", line 978, in forward x, x , shape = level(x, return_wo_downsample=True, shape=shape, level_idx=level_idx) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Python\Python311\Lib\site-packages\torch\nn\modules\module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Python\Python311\Lib\site-packages\torch\nn\modules\module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\AI\workspace\internimage_v4.py", line 747, in forward x = blk(x, shape=shape, level_idx=level_idx) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Python\Python311\Lib\site-packages\torch\nn\modules\module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Python\Python311\Lib\site-packages\torch\nn\modules\module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\AI\workspace\internimage_v4.py", line 660, in forward x = _inner_forward(x, shape, level_idx) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\AI\workspace\internimage_v4.py", line 642, in _inner_forward x = x + self.drop_path(self.res_post_norm1(self.dcn(self.norm1(x), shape, level_idx))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Python\Python311\Lib\site-packages\torch\nn\modules\module.py", line 1751, in _wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Python\Python311\Lib\site-packages\torch\nn\modules\module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: DCNv4.forward() takes from 2 to 3 positional arguments but 4 were given

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions