Jittor / jittor

Jittor is a high-performance deep learning framework based on JIT compiling and meta-operators.
https://cg.cs.tsinghua.edu.cn/jittor/
Apache License 2.0
3.08k stars 311 forks source link

Fail to use jittor.nn._fft2() #359

Open Joey1998hub opened 2 years ago

Joey1998hub commented 2 years ago

Describe the bug

Fail to use nn._fft2() After nn._fft2(), the data type has been changed from jt.Var to jt.jittor_core.Var, the log shows some errors during compiling.

Full Log

image image

Minimal Reproduce

import jittor as jt import numpy as np from jittor import nn

jt.flags.use_cuda = 1 def test_fft_forward(): img = np.random.rand(256, 300) img2 = np.random.rand(256, 300) X = np.stack([img, img2], 0) x = jt.array(X,dtype=jt.float32) x = jt.stack([x, jt.zeros_like(x)], 3) y = nn._fft2(x) y_jt_real = y[:, :, :, 0].data y_jt_imag = y[:, :, :, 1].data

test_fft_forward()

Expected behavior

Hope the problem can be solved and jt.nn._fft2() can be executed correctly and quickly.

Jittor commented 2 years ago

Thanks for reporting, we are working on it.

cxjyxxme commented 2 years ago

This problem is fixed in the latest version of jittor, please upgrade your jittor.