PaddlePaddle / PaddleClas

A treasure chest for visual classification and recognition powered by PaddlePaddle
Apache License 2.0
5.47k stars 1.17k forks source link

运行swin-transformer报错, #991

Closed Williamlizl closed 2 years ago

Williamlizl commented 3 years ago

Traceback (most recent call last): File "tools/train.py", line 31, in <module> trainer.train() File "/home/lbc/PaddleClas/ppcls/engine/trainer.py", line 171, in train out = self.model(batch[0]) File "/home/lbc/.local/lib/python3.6/site-packages/paddle/fluid/dygraph/layers.py", line 898, in __call__ outputs = self.forward(*inputs, **kwargs) File "/home/lbc/PaddleClas/ppcls/arch/backbone/model_zoo/swin_transformer.py", line 718, in forward x = self.forward_features(x) File "/home/lbc/PaddleClas/ppcls/arch/backbone/model_zoo/swin_transformer.py", line 710, in forward_features x = layer(x) File "/home/lbc/.local/lib/python3.6/site-packages/paddle/fluid/dygraph/layers.py", line 898, in __call__ outputs = self.forward(*inputs, **kwargs) File "/home/lbc/PaddleClas/ppcls/arch/backbone/model_zoo/swin_transformer.py", line 508, in forward x = blk(x) File "/home/lbc/.local/lib/python3.6/site-packages/paddle/fluid/dygraph/layers.py", line 898, in __call__ outputs = self.forward(*inputs, **kwargs) File "/home/lbc/PaddleClas/ppcls/arch/backbone/model_zoo/swin_transformer.py", line 363, in forward x = shortcut + self.drop_path(x) File "/home/lbc/.local/lib/python3.6/site-packages/paddle/fluid/dygraph/layers.py", line 898, in __call__ outputs = self.forward(*inputs, **kwargs) File "/home/lbc/PaddleClas/ppcls/arch/backbone/model_zoo/vision_transformer.py", line 81, in forward return drop_path(x, self.drop_prob, self.training) File "/home/lbc/PaddleClas/ppcls/arch/backbone/model_zoo/vision_transformer.py", line 66, in drop_path random_tensor = keep_prob + paddle.rand(shape, dtype=x.dtype) File "/home/lbc/.local/lib/python3.6/site-packages/paddle/tensor/random.py", line 722, in rand return uniform(shape, dtype, min=0.0, max=1.0, name=name) File "/home/lbc/.local/lib/python3.6/site-packages/paddle/tensor/random.py", line 502, in uniform float(max), 'seed', seed, 'dtype', dtype) SystemError: (Fatal) Operator uniform_random raises an thrust::system::system_error exception. The exception content is :parallel_for failed: cudaErrorInvalidConfiguration: invalid configuration argument. (at /paddle/paddle/fluid/imperative/tracer.cc:192)

cuicheng01 commented 3 years ago

在https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/develop/install/pip/linux-pip.html,安装develop版本的paddlepaddle试一下~

Chen-Song commented 3 years ago

@Williamlizl 你好,请问你找到出现这个问题的原因了吗?我也遇到了相同的问题

paddle-bot-old[bot] commented 2 years ago

Since this issue has not been updated for more than three months, it will be closed, if it is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. It is recommended to pull and try the latest code first. 由于该问题超过三个月未更新,将会被关闭,若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。