-
Couldn't load subscription status.
- Fork 5.9k
Closed
Labels
User用于标记用户问题用于标记用户问题
Description
安装完paddle后,环境Python2,7,paddle0.11.0
执行文档中纽约房价预测的代码报错。报错的代码是Initialize PaddlePaddle.也就是第2句代码,错误提示为提示非法指令。然后我单步跟踪初始化,发现初始化调用了以下2句
def init(**kwargs):
import py_paddle.swig_paddle as api
而这里的第二句导入py_paddle.swig_paddle as api报错,提示非法指令
房价预测代码如下:
import paddle.v2 as paddle
Initialize PaddlePaddle.
paddle.init(use_gpu=False, trainer_count=1)
Configure the neural network.
x = paddle.layer.data(name='x', type=paddle.data_type.dense_vector(13))
y_predict = paddle.layer.fc(input=x, size=1, act=paddle.activation.Linear())
Infer using provided test data.
probs = paddle.infer(
output_layer=y_predict,
parameters=paddle.dataset.uci_housing.model(),
input=[item for item in paddle.dataset.uci_housing.test()()])
for i in xrange(len(probs)):
print 'Predicted price: ${:,.2f}'.format(probs[i][0] * 1000)
Metadata
Metadata
Assignees
Labels
User用于标记用户问题用于标记用户问题