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.Resize无法运算batch_size为0的张量 #462

Open
PhyllisJi opened this issue Jul 20, 2023 · 0 comments
Open

jittor.nn.Resize无法运算batch_size为0的张量 #462

PhyllisJi opened this issue Jul 20, 2023 · 0 comments

Comments

@PhyllisJi
Copy link

关键错误信息

jittor.nn.Resize输入batch_size为0的张量,即第0维度尺寸为0的张量,会无法计算并在底层算子报出未知错误

预期行为

jittor.nn.Resize对于0batch_size输入,应正常计算形状,元素依然为空

错误日志

Traceback (most recent call last):
  File "D:\PythonProjects\venv\lib\site-packages\IPython\core\formatters.py", line 223, in catch_format_error
    r = method(self, *args, **kwargs)
  File "D:\PythonProjects\venv\lib\site-packages\IPython\core\formatters.py", line 708, in __call__
    printer.pretty(obj)
  File "D:\PythonProjects\venv\lib\site-packages\IPython\lib\pretty.py", line 410, in pretty
    return _repr_pprint(obj, self, cycle)
  File "D:\PythonProjects\venv\lib\site-packages\IPython\lib\pretty.py", line 778, in _repr_pprint
    output = repr(obj)
  File "D:\PythonProjects\venv\lib\site-packages\jittor\__init__.py", line 1990, in vtos
    data_str = f"jt.Var({v.data}, dtype={v.dtype})"
RuntimeError: [f 0711 10:45:44.753000 28 executor.cc:682] 
Execute fused operator(5/6) failed.[OP TYPE]: fused_op:( index, unary.floor_int, unary.floor_int, reindex,)
[Input]: float32[0,3,1,1,], float32[0,3,1,1,], float32[0,3,3,3,], 
[Output]: float32[0,3,1,1,], 
[Async Backtrace]: not found, please set env JT_SYNC=1, trace_py_var=3 
[Reason]: [f 0711 10:45:44.753000 28 op_compiler.cc:832] Check failed: member.size() <= var_num  Something wrong... Could you please report this issue?
**********
Async error was detected. To locate the async backtrace and get better error report, please rerun your code with two enviroment variables set:
cmd: 
 set JT_SYNC=1
 set trace_py_var=3
powershell: 
 $env:JT_SYNC=1
 $env:trace_py_var=3

最小复现

x = jittor.randn(0,3,3,3)
p = jittor.nn.Resize(size=(1,1))
p(x)
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