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

jittor.nn.MaxUnpool2d 缺乏异常捕获,提示缺少参数id #588

Open
PhyllisJi opened this issue Sep 6, 2024 · 0 comments
Open

jittor.nn.MaxUnpool2d 缺乏异常捕获,提示缺少参数id #588

PhyllisJi opened this issue Sep 6, 2024 · 0 comments

Comments

@PhyllisJi
Copy link

Describe the bug

nn.MaxUnpool2d 需要两个输入,分别为input_data和indices,但是jittor没有对参数个数进行检查,也没有错误提示,而是继续执行到较为底层的代码。

Full Log

TypeError                                 Traceback (most recent call last)
Cell In[4], line 13
     11 # 最大反池化操作
     12 unpool = nn.MaxUnpool2d(kernel_size=(1, 6), stride=(8, 3))
---> 13 unpooled_output = unpool(output)

File ~/miniconda3/envs/myconda/lib/python3.9/site-packages/jittor/__init__.py:1168, in Module.__call__(self, *args, **kw)
   1167 def __call__(self, *args, **kw):
-> 1168     return self.execute(*args, **kw)

TypeError: execute() missing 1 required positional argument: 'id'

Minimal Reproduce

import jittor as jt
import jittor.nn as nn

# 创建输入数据
input_data = jt.array([[[[1, 2, 3, 4, 5, 6]]]])

# 最大池化操作,获取输出和索引
max_pool = nn.MaxPool2d(kernel_size=(1, 6), stride=(1, 1), return_indices=True)
output, indices = max_pool(input_data)

# 最大反池化操作
unpool = nn.MaxUnpool2d(kernel_size=(1, 6), stride=(8, 3))
unpooled_output = unpool(output)

Expected behavior

提供明确的错误信息和引导

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

1 participant