File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 14
14
# limitations under the License.
15
15
set -e
16
16
set -x
17
+ BASE_URL=' http://paddlepaddle.cdn.bcebos.com/model_zoo/embedding'
17
18
18
- # download the dictionary and pretrained model
19
- for file in baidu.dict model_32.emb model_64.emb model_128.emb model_256.emb
20
- do
21
- wget http://paddlepaddle.bj.bcebos.com/model_zoo/embedding/$file
19
+ wget ${BASE_URL} /baidu.dict
20
+
21
+ DOWNLOAD_ITEMS=(model_32.emb model_64.emb model_128.emb model_256.emb)
22
+ ITEM_MD5=(f88c8325ee6da6187f1080e8fe66c1cd
23
+ 927cf70f27f860aff1a5703ebf7f1584
24
+ a52e43655cd25d279777ed509a1ae27b
25
+ b92c67fe9ff70fea53596080e351ac80)
26
+
27
+ for (( i= 0 ; i< ${# ITEM_MD5[@]} ; i++ ))
28
+ do
29
+ FILENAME=${DOWNLOAD_ITEMS[${i}]}
30
+ REAL_MD5=` wget ${BASE_URL} /${FILENAME} -O - | tee ${FILENAME} | md5sum | cut -d ' ' -f 1`
31
+ EXPECTED_MD5=${ITEM_MD5[${i}]}
32
+ [ " ${EXPECTED_MD5} " = " ${REAL_MD5} " ]
22
33
done
You can’t perform that action at this time.
0 commit comments