windows安装paddlepaddle

作者: zengde 分类: 笔记 发布时间: 2017-10-03 05:38

先安装docker windows。

docker pull docker.paddlepaddle.org/paddle:0.10.0
docker run docker.paddlepaddle.org/paddle:0.10.0

运行book中例子时

docker run -it -v e:/python/paddle:/work docker.paddlepaddle.org/paddle /work/01.fit_a_line/train.py

会出现以下错误

standard_init_linux.go:185: exec user process caused “exec format error”

这时打开train.py在文件最开头加上

#! /usr/bin/env python

再次运行成功。

输出信息

I1003 05:21:51.231935 1 Util.cpp:166] commandline: –use_gpu=False –trainer_count=1
I1003 05:21:51.260679 1 GradientMachine.cpp:85] Initing parameters..
I1003 05:21:51.260928 1 GradientMachine.cpp:92] Init parameters done.
Cache file /root/.cache/paddle/dataset/uci_housing/housing.data not found, downloading https://archive.ics.uci.edu/ml/machine-learning-databases/housing/housing.data
[==================================================]Pass 0, Batch 0, Cost 493.469055
Pass 0, Batch 100, Cost 803.323608
Pass 0, Batch 200, Cost 125.570641
Test 0, Cost 56.534771
Pass 1, Batch 0, Cost 58.915245
Pass 1, Batch 100, Cost 35.891193
Pass 1, Batch 200, Cost 3.988058
Test 1, Cost 22.634530
Pass 2, Batch 0, Cost 12.105108
Pass 2, Batch 100, Cost 7.062102
Pass 2, Batch 200, Cost 4.424887
Test 2, Cost 18.216233
Pass 3, Batch 0, Cost 13.105423
Pass 3, Batch 100, Cost 4.722981
Pass 3, Batch 200, Cost 159.354462
Test 3, Cost 17.655986
Pass 4, Batch 0, Cost 48.921921
Pass 4, Batch 100, Cost 66.497086
Pass 4, Batch 200, Cost 17.186016
Test 4, Cost 17.282573
Pass 5, Batch 0, Cost 6.950521
Pass 5, Batch 100, Cost 12.489837
Pass 5, Batch 200, Cost 10.656190
Test 5, Cost 16.780671
Pass 6, Batch 0, Cost 12.161614
Pass 6, Batch 100, Cost 24.908964
Pass 6, Batch 200, Cost 6.658436
Test 6, Cost 16.264656
Pass 7, Batch 0, Cost 16.021093
Pass 7, Batch 100, Cost 10.012644
Pass 7, Batch 200, Cost 57.955658
Test 7, Cost 15.901788
Pass 8, Batch 0, Cost 19.960938
Pass 8, Batch 100, Cost 9.302691
Pass 8, Batch 200, Cost 36.418594
Test 8, Cost 15.567908
Pass 9, Batch 0, Cost 11.548723
Pass 9, Batch 100, Cost 367.723785
Pass 9, Batch 200, Cost 15.532894
Test 9, Cost 15.162358
Pass 10, Batch 0, Cost 185.240250
Pass 10, Batch 100, Cost 42.120693
Pass 10, Batch 200, Cost 56.022266
Test 10, Cost 14.839095
Pass 11, Batch 0, Cost 22.703262
Pass 11, Batch 100, Cost 12.913656
Pass 11, Batch 200, Cost 3.653816
Test 11, Cost 14.589647
Pass 12, Batch 0, Cost 76.120995
Pass 12, Batch 100, Cost 19.650480
Pass 12, Batch 200, Cost 35.415474
Test 12, Cost 14.334893
Pass 13, Batch 0, Cost 9.333673
Pass 13, Batch 100, Cost 10.685551
Pass 13, Batch 200, Cost 63.300232
Test 13, Cost 14.152077
Pass 14, Batch 0, Cost 23.429882
Pass 14, Batch 100, Cost 20.070412
Pass 14, Batch 200, Cost 46.426815
Test 14, Cost 13.982552
Pass 15, Batch 0, Cost 3.398451
Pass 15, Batch 100, Cost 19.799126
Pass 15, Batch 200, Cost 32.973774
Test 15, Cost 13.784409
Pass 16, Batch 0, Cost 149.857635
Pass 16, Batch 100, Cost 0.685044
Pass 16, Batch 200, Cost 22.288609
Test 16, Cost 13.664057
Pass 17, Batch 0, Cost 120.255943
Pass 17, Batch 100, Cost 1.895535
Pass 17, Batch 200, Cost 7.489229
Test 17, Cost 13.528892
Pass 18, Batch 0, Cost 9.191376
Pass 18, Batch 100, Cost 3.473510
Pass 18, Batch 200, Cost 5.664379
Test 18, Cost 13.456975
Pass 19, Batch 0, Cost 14.113221
Pass 19, Batch 100, Cost 4.773556
Pass 19, Batch 200, Cost 11.664934
Test 19, Cost 13.364992
Pass 20, Batch 0, Cost 18.509239
Pass 20, Batch 100, Cost 111.023895
Pass 20, Batch 200, Cost 5.161125
Test 20, Cost 13.290885
Pass 21, Batch 0, Cost 12.964050
Pass 21, Batch 100, Cost 3.008502
Pass 21, Batch 200, Cost 10.978169
Test 21, Cost 13.249224
Pass 22, Batch 0, Cost 15.156858
Pass 22, Batch 100, Cost 196.492126
Pass 22, Batch 200, Cost 16.158039
Test 22, Cost 13.214649
Pass 23, Batch 0, Cost 25.716969
Pass 23, Batch 100, Cost 17.644163
Pass 23, Batch 200, Cost 2.666825
Test 23, Cost 13.249098
Pass 24, Batch 0, Cost 23.139029
Pass 24, Batch 100, Cost 54.998062
Pass 24, Batch 200, Cost 20.450209
Test 24, Cost 13.149067
Pass 25, Batch 0, Cost 13.594913
Pass 25, Batch 100, Cost 16.452496
Pass 25, Batch 200, Cost 0.671061
Test 25, Cost 13.193532
Pass 26, Batch 0, Cost 10.310287
Pass 26, Batch 100, Cost 3.522996
Pass 26, Batch 200, Cost 14.978899
Test 26, Cost 13.152677
Pass 27, Batch 0, Cost 10.942678
Pass 27, Batch 100, Cost 12.816362
Pass 27, Batch 200, Cost 6.580270
Test 27, Cost 13.122860
Pass 28, Batch 0, Cost 2.828136
Pass 28, Batch 100, Cost 4.609221
Pass 28, Batch 200, Cost 28.642906
Test 28, Cost 13.158241
Pass 29, Batch 0, Cost 29.888838
Pass 29, Batch 100, Cost 34.513622
Pass 29, Batch 200, Cost 10.359107
Test 29, Cost 13.201226
label=8.5, predict=11.7524
label=5.0, predict=13.6777
label=11.9, predict=10.7218
label=27.9, predict=18.0667
label=17.2, predict=13.0197