Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

'module' object has no attribute 'get_places'

Open chenbblei opened this issue 8 years ago • 2 comments

fluid/DeepASR/model_utils/model.py, line 91, in stacked_lstmp_model places = fluid.layers.get_places() AttributeError: 'module' object has no attribute 'get_places'

请问怎么解决

chenbblei avatar Aug 13 '18 02:08 chenbblei

请问你使用的是什么版本的paddle? 因为 https://github.com/PaddlePaddle/Paddle/commit/6c83dcd622000756d470202ff957907861920f26 (7月10日) 对get_places做了隐藏,所以如果使用最新版本的paddle,需要做如下修改:

## 增加import语句
from paddle.fluid.layers.device import get_places
## 91行需要改成
places = get_places()

您可以先自行修改,我们会尽快修复。

luotao1 avatar Aug 13 '18 03:08 luotao1

@luotao1 多谢

chenbblei avatar Aug 13 '18 03:08 chenbblei