@@ -12,7 +12,7 @@ Simply run the following command to install, the version is cpu_avx_openblas:
12
12
13
13
pip install paddlepaddle
14
14
15
- If you need to install GPU version (cuda7.5_cudnn5_avx_openblas ), run:
15
+ If you need to install GPU version (cuda8.0_cudnn5_avx_openblas ), run:
16
16
17
17
.. code-block :: bash
18
18
@@ -31,18 +31,18 @@ code:
31
31
32
32
import paddle.dataset.uci_housing as uci_housing
33
33
import paddle.fluid as fluid
34
-
34
+
35
35
with fluid.scope_guard(fluid.core.Scope()):
36
36
# initialize executor with cpu
37
37
exe = fluid.Executor(place = fluid.CPUPlace())
38
- # load inference model
38
+ # load inference model
39
39
[inference_program, feed_target_names,fetch_targets] = \
40
40
fluid.io.load_inference_model(uci_housing.fluid_model(), exe)
41
41
# run inference
42
- result = exe.run(inference_program,
43
- feed = {feed_target_names[0 ]: uci_housing.predict_reader()},
42
+ result = exe.run(inference_program,
43
+ feed = {feed_target_names[0 ]: uci_housing.predict_reader()},
44
44
fetch_list = fetch_targets)
45
- # print predicted price is $12,273.97
45
+ # print predicted price is $12,273.97
46
46
print ' Predicted price: ${:,.2f } ' .format(result[0 ][0 ][0 ] * 1000 )
47
47
48
48
Run :code: `python housing.py ` and voila! It should print out a list of predictions
0 commit comments