hanchenchen / Attention-A-Lightweight-2D-Hand-Pose-Estimation-Approach-Pytorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Output 0 of ReshapeAliasBackward0 is a view and is being modified inplace. This view is the output of a function that returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace operation by an out-of-place one.

wefwwef4 opened this issue · comments

Traceback (most recent call last):
File "C:\Mywork\pythonproject\Attention-A-Lightweight-2D-Hand-Pose-Estimation-Approach-Pytorch-main\model_init_.py", line 243, in
y = model(x)
File "C:\Users\90458\anaconda3\envs\yolov8\lib\site-packages\torch\nn\modules\module.py", line 1501, in call_impl
return forward_call(*args, **kwargs)
File "C:\Mywork\pythonproject\Attention-A-Lightweight-2D-Hand-Pose-Estimation-Approach-Pytorch-main\model_init
.py", line 214, in forward
x = self.dense3(x)
File "C:\Users\90458\anaconda3\envs\yolov8\lib\site-packages\torch\nn\modules\module.py", line 1501, in call_impl
return forward_call(*args, **kwargs)
File "C:\Mywork\pythonproject\Attention-A-Lightweight-2D-Hand-Pose-Estimation-Approach-Pytorch-main\model_init
.py", line 154, in forward
inputs = self.arbi
File "C:\Users\90458\anaconda3\envs\yolov8\lib\site-packages\torch\nn\modules\module.py", line 1501, in call_impl
return forward_call(*args, **kwargs)
File "C:\Mywork\pythonproject\Attention-A-Lightweight-2D-Hand-Pose-Estimation-Approach-Pytorch-main\model_init
.py", line 72, in forward
augmented_conv = self.attention_aug(x)
File "C:\Users\90458\anaconda3\envs\yolov8\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Users\90458\anaconda3\envs\yolov8\lib\site-packages\torch\nn\modules\container.py", line 217, in forward
input = module(input)
File "C:\Users\90458\anaconda3\envs\yolov8\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Mywork\pythonproject\Attention-A-Lightweight-2D-Hand-Pose-Estimation-Approach-Pytorch-main\model\attention_augmentation2D.py", line 58, in forward
flat_q, flat_k, flat_v, q, k, v = self.compute_flat_qkv(x, self.dk, self.dv, self.Nh)
File "C:\Mywork\pythonproject\Attention-A-Lightweight-2D-Hand-Pose-Estimation-Approach-Pytorch-main\model\attention_augmentation2D.py", line 85, in compute_flat_qkv
q *= dkh ** -0.5
RuntimeError: Output 0 of ReshapeAliasBackward0 is a view and is being modified inplace. This view is the output of a function that returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace operation by an out-of-place one.

Process finished with exit code 1