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

causal_conv1d_ref()参数调用错误 #17

Open
Oytpzy opened this issue May 10, 2024 · 2 comments
Open

causal_conv1d_ref()参数调用错误 #17

Oytpzy opened this issue May 10, 2024 · 2 comments

Comments

@Oytpzy
Copy link

Oytpzy commented May 10, 2024

作者您好,我在运行代码的过程中遇到了位置信息输入越界的问题,
Traceback (most recent call last):
File "D:\TSproject\S-D-Mamba-main\S-D-Mamba-main\run.py", line 135, in
exp.train(setting)
File "D:\TSproject\S-D-Mamba-main\S-D-Mamba-main\experiments\exp_long_term_forecasting.py", line 144, in train
outputs = self.model(batch_x, batch_x_mark, dec_inp, batch_y_mark)
File "D:\anaconda\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\TSproject\S-D-Mamba-main\S-D-Mamba-main\model\S_Mamba.py", line 93, in forward
dec_out = self.forecast(x_enc, x_mark_enc, x_dec, x_mark_dec)
File "D:\TSproject\S-D-Mamba-main\S-D-Mamba-main\model\S_Mamba.py", line 80, in forecast
enc_out, attns = self.encoder(enc_out, attn_mask=None)
File "D:\anaconda\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\TSproject\S-D-Mamba-main\S-D-Mamba-main\layers\Mamba_EncDec.py", line 68, in forward
x, attn = attn_layer(x, attn_mask=attn_mask, tau=tau, delta=delta)
File "D:\anaconda\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\TSproject\S-D-Mamba-main\S-D-Mamba-main\layers\Mamba_EncDec.py", line 37, in forward
new_x = self.attention(x) + self.attention_r(x.flip(dims=[1])).flip(dims=[1])
File "D:\anaconda\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\anaconda\lib\site-packages\mamba_ssm\modules\mamba_simple.py", line 146, in forward
out = mamba_inner_fn(
File "D:\anaconda\lib\site-packages\mamba_ssm\ops\selective_scan_interface.py", line 306, in mamba_inner_fn
return mamba_inner_ref(xz, conv1d_weight, conv1d_bias, x_proj_weight, delta_proj_weight,
File "D:\anaconda\lib\site-packages\mamba_ssm\ops\selective_scan_interface.py", line 321, in mamba_inner_ref
x = causal_conv1d_fn(x, rearrange(conv1d_weight, "d 1 w -> d w"), conv1d_bias, "silu")
File "D:\anaconda\lib\site-packages\causal_conv1d\causal_conv1d_interface.py", line 49, in causal_conv1d_fn
return causal_conv1d_ref(x, weight, bias, seq_idx, activation)
TypeError: causal_conv1d_ref() takes from 2 to 4 positional arguments but 5 were given
,请问 causal_conv1d_ref()这个函数只能接受2-4个位置参数,为什么会出现输入5位置信息的情况呀

@wzhwzhwzh0921
Copy link
Owner

没有碰到过这种情况, 版本正确了吗?是改参数了吗?同样的,如果有这样的Mamb Block相关的问题,建议去Mamba项目下的issue里找类似的解决方案...

@Oytpzy
Copy link
Author

Oytpzy commented May 10, 2024 via email

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

No branches or pull requests

2 participants