Skip to content

Commit f45b45e

Browse files
committed
A traffic prediction demo for ASC17
1 parent 3403c00 commit f45b45e

File tree

6 files changed

+9
-12
lines changed

6 files changed

+9
-12
lines changed

demo/traffic_prediction/data/get_data.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2016 Baidu, Inc. All Rights Reserved
2+
# Copyright (c) 2016 PaddlePaddle Authors, Inc. All Rights Reserved
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ cd $DIR
2121

2222
#download the dataset
2323
echo "Downloading traffic data..."
24-
wget http://paddlepaddle.bj.bcebos.com/demo/traffic/traffic_data.tar.gz
24+
wget http://paddlepaddle.cdn.bcebos.com/demo/traffic/traffic_data.tar.gz
2525

2626
#extract package
2727
echo "Unzipping..."

demo/traffic_prediction/dataprovider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2016 Baidu, Inc. All Rights Reserved
1+
# Copyright (c) 2016 PaddlePaddle Authors, Inc. All Rights Reserved
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
1616
import sys
1717
import numpy as np
1818
TERM_NUM = 24
19-
FORECASTING_NUM = 25
19+
FORECASTING_NUM = 24
2020
LABEL_VALUE_NUM = 4
2121

2222

demo/traffic_prediction/gen_result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2016 Baidu, Inc. All Rights Reserved
1+
# Copyright (c) 2016 PaddlePaddle Authors, Inc. All Rights Reserved
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

demo/traffic_prediction/predict.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2016 Baidu, Inc. All Rights Reserved
2+
# Copyright (c) 2016 PaddlePaddle Authors, Inc. All Rights Reserved
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

demo/traffic_prediction/train.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2016 Baidu, Inc. All Rights Reserved
2+
# Copyright (c) 2016 PaddlePaddle Authors, Inc. All Rights Reserved
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
1515
set -e
1616

1717
cfg=trainer_config.py
18-
#TRAINER_BIN="./paddle_trainer"
1918
paddle train \
2019
--config=$cfg \
2120
--save_dir=./output \
@@ -25,6 +24,4 @@ paddle train \
2524
--num_passes=10 \
2625
--use_gpu=false \
2726
--show_parameter_stats_period=3000 \
28-
--test_wait=1
29-
#--test_all_data_in_one_period=1 \
3027
2>&1 | tee 'train.log'

demo/traffic_prediction/trainer_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2016 Baidu, Inc. All Rights Reserved
1+
# Copyright (c) 2016 PaddlePaddle Authors, Inc. All Rights Reserved
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
2222
train_list=trn, test_list=tst, module="dataprovider", obj=process)
2323
################################### Parameter Configuaration #######################################
2424
TERM_NUM = 24
25-
FORECASTING_NUM = 25
25+
FORECASTING_NUM = 24
2626
emb_size = 16
2727
batch_size = 128 if not is_predict else 1
2828
settings(

0 commit comments

Comments
 (0)