jittor icon indicating copy to clipboard operation
jittor copied to clipboard

Support for LSTM, GRU, Conv3d, ConstantPad3d

Open dzh19990407 opened this issue 4 years ago • 14 comments

请问什么时候能支持LSTM和3d卷积相关的操作呢?

dzh19990407 avatar May 31 '21 05:05 dzh19990407

感谢您的反馈,lstm,gru已经支持了,constantpad3d可以参考直接使用pad,我们后续也会补充。 conv3d目前没有merge到主分支,您可以参考这个pr  #166

---Original--- From: "Zihan @.> Date: Mon, May 31, 2021 13:31 PM To: @.>; Cc: @.***>; Subject: [Jittor/jittor] Support for LSTM, GRU, Conv3d, ConstantPad3d (#223)

请问什么时候能支持LSTM和3d卷积相关的操作呢?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Jittor avatar May 31 '21 05:05 Jittor

谢谢上述答复,请问BatchNorm3d支持了吗?

dzh19990407 avatar May 31 '21 06:05 dzh19990407

支持,直接调用batchnorm即可

---Original--- From: "Zihan @.> Date: Mon, May 31, 2021 14:24 PM To: @.>; Cc: @.@.>; Subject: Re: [Jittor/jittor] Support for LSTM, GRU, Conv3d, ConstantPad3d (#223)

谢谢上述答复,请问BatchNorm3d支持了吗?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Jittor avatar May 31 '21 06:05 Jittor

image 在进行detach()操作的时候程序会卡住,这个是什么原因呢?

dzh19990407 avatar May 31 '21 12:05 dzh19990407

这个是pytorch的问题,您试试安装pytorch1.8就能解决问题,如果还不行加上环境变量use_mkl=0

---Original--- From: "Zihan @.> Date: Mon, May 31, 2021 16:47 PM To: @.>; Cc: @.@.>; Subject: Re: [Jittor/jittor] Support for LSTM, GRU, Conv3d, ConstantPad3d (#223)

我使用的是pytorch1.6.0+CUDA10.1。我使用jt.load()读取我在pytorch上的预训练模型的时候出现了以下的问题,main_model->video_model里面的jt.load()函数可以正常读取模型,但是在main_model进行jt.load()的时候报出munmap_chunk(): invalid pointer的错误。

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Jittor avatar May 31 '21 12:05 Jittor

我改了pytorch1.8之后detach()可以正常执行了,但是numpy()又卡住,而且我改了环境变量还不行

dzh19990407 avatar May 31 '21 13:05 dzh19990407

.numpy()的时候说明框架正在计算,因为jittor是延迟执行的,之前构建的计算图在.numpy的时候才会执行,卡一下是正常的,如果卡了很久可能是没有开启GPU加速,或者数据规模过大,如果您用了conv3d的话,目前conv3d还没有merge进主分支,速度较慢,推荐您把数据改小。

conv3d我们正在优化,很快会有个正式版本

---Original--- From: "Zihan @.> Date: Mon, May 31, 2021 21:12 PM To: @.>; Cc: @.@.>; Subject: Re: [Jittor/jittor] Support for LSTM, GRU, Conv3d, ConstantPad3d (#223)

我改了pytorch1.8之后detach()可以正常执行了,但是numpy()又卡住,而且我改了环境变量还不行

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Jittor avatar May 31 '21 13:05 Jittor

image 在我打开了GPU加速之后遇到这这种问题,这可能是什么原因呢? 我使用的是anaconda中的虚拟环境

dzh19990407 avatar May 31 '21 14:05 dzh19990407

image 在我打开了GPU加速之后遇到这这种问题,这可能是什么原因呢? 我使用的是anaconda中的虚拟环境

这个bug可以通过将nn.py中的Line 574左右 y = yy.sum([2,5,6]) # Kc, Kh, Kw一行进行修改解决 image

dzh19990407 avatar Jun 01 '21 06:06 dzh19990407

发现新的bug,对于Conv2d函数,当xx.shape = [2,2048,2056,10,10,3,3,]时,会报出如下错误: image 错误处代码位于nn.py Line563左右: image 请问是显存不足的原因吗

dzh19990407 avatar Jun 01 '21 06:06 dzh19990407

这个应该是因为内存不足了,因为xx这些中间变量因为会被优化掉,但是如果打印出来的话,就会导致无法进行优化,从而内存不足

---Original--- From: "Zihan @.> Date: Tue, Jun 1, 2021 14:25 PM To: @.>; Cc: @.@.>; Subject: Re: [Jittor/jittor] Support for LSTM, GRU, Conv3d, ConstantPad3d (#223)

发现新的bug,对于Conv2d函数,当xx.shape = [2,2048,2056,10,10,3,3,]时,会报出如下错误:

错误处代码位于nn.py Line563左右:

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Jittor avatar Jun 01 '21 07:06 Jittor

这个看起来似乎是cudnn报错了,您的cuda版本和cudnn版本是多少呢,请问python3.7 -m jittor.test.test_resnet能成功运行吗?

---Original--- From: "Zihan @.> Date: Tue, Jun 1, 2021 14:23 PM To: @.>; Cc: @.@.>; Subject: Re: [Jittor/jittor] Support for LSTM, GRU, Conv3d, ConstantPad3d (#223)

在我打开了GPU加速之后遇到这这种问题,这可能是什么原因呢? 我使用的是anaconda中的虚拟环境

这个bug可以通过将nn.py中的Line 574左右 y = yy.sum([2,5,6]) # Kc, Kh, Kw一行进行修改解决

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Jittor avatar Jun 01 '21 07:06 Jittor

我运行python3.7 -m jittor.test.test_resnet报错 image 之前我把pytorch更新到1.8.0之后,cuda版本和cudnn也进行了更新 现在的cuda版本是10.2.89 cudnn版本是8.1.0

dzh19990407 avatar Jun 01 '21 10:06 dzh19990407

conv3d 和 pool3d目前已经在主分支支持。

Jittor avatar Jun 04 '21 06:06 Jittor