File "D:\PythonProjects\TEST\test.py", line 4, in
y = m(x)
File "D:\PythonProjects\venv\lib\site-packages\jittor__init.py", line 1168, in call__
return self.execute(*args, *kw)
File "D:\PythonProjects\venv\lib\site-packages\jittor\nn.py", line 3045, in execute
return x jt.tanh(jt.softplus(x))
AttributeError: module 'jittor' has no attribute 'softplus'
Describe the bug
jittor.nn.Mish无法使用: 在调用jittor.nn.Mish进行计算时,会出现以下错误(下为关键错误信息)。Mish无论以何种方式调用,均无法正常工作:
File "D:\PythonProjects\TEST\test.py", line 4, in
y = m(x)
File "D:\PythonProjects\venv\lib\site-packages\jittor__init.py", line 1168, in call__
return self.execute(*args, *kw)
File "D:\PythonProjects\venv\lib\site-packages\jittor\nn.py", line 3045, in execute
return x jt.tanh(jt.softplus(x))
AttributeError: module 'jittor' has no attribute 'softplus'
经查看源码发现,Mish需要使用的 jt.softplus 函数不存在,怀疑这是导致bug的原因 以下为本次调用的完整输出信息和最小复现代码
Full Log
[i 0609 20:34:13.981000 28 compiler.py:955] Jittor(1.3.7.16) src: d:\pythonprojects\venv\lib\site-packages\jittor [i 0609 20:34:13.996000 28 compiler.py:956] cl at C:\Users\90768.cache\jittor\msvc\VC_____\bin\cl.exe(19.29.30133) [i 0609 20:34:13.996000 28 compiler.py:957] cache_path: C:\Users\90768.cache\jittor\jt1.3.7\cl\py3.10.11\Windows-10-10.x9b\13thGenIntelRCx83\default [i 0609 20:34:13.998000 28 install_cuda.py:93] cuda_driver_version: [12, 1, 0] [i 0609 20:34:14.009000 28 init.py:411] Found C:\Users\90768.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin\nvcc.exe(11.2.67) at C:\Users\90768.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin\nvcc.exe. [i 0609 20:34:14.027000 28 compiler.py:1010] cuda key:cu11.2.67 [i 0609 20:34:14.028000 28 init.py:227] Total mem: 31.73GB, using 10 procs for compiling. Compiling jittor_core(151/151) used: 14.630s eta: 0.000s [i 0609 20:34:36.515000 28 jit_compiler.cc:28] Load ccpath: C:\Users\90768.cache\jittor\msvc\VC____\\bin\cl.exe [i 0609 20:34:36.524000 28 init.cc:62] Found cuda archs: [89,] [w 0609 20:34:40.567000 28 compiler.py:1381] CUDA arch(89)>86 will be backward-compatible Traceback (most recent call last): File "D:\PythonProjects\venv\lib\site-packages\IPython\core\interactiveshell.py", line 3508, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in
runfile('D:\PythonProjects\TEST\test.py', wdir='D:\PythonProjects\TEST')
File "D:\PyCharm 2023.1.2\plugins\python\helpers\pydev_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "D:\PyCharm 2023.1.2\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:\PythonProjects\TEST\test.py", line 4, in
y = m(x)
File "D:\PythonProjects\venv\lib\site-packages\jittor__init.py", line 1168, in call__
return self.execute(*args, *kw)
File "D:\PythonProjects\venv\lib\site-packages\jittor\nn.py", line 3045, in execute
return x jt.tanh(jt.softplus(x))
AttributeError: module 'jittor' has no attribute 'softplus'
Minimal Reproduce
import jittor x = jittor.randn(3, 3) m = jittor.nn.Mish() y = m(x)