@@ -9,18 +9,6 @@ TENSOR_NAMES=(
9
9
" uber-pickups"
10
10
)
11
11
12
- # The tensor format from FROSTT is not self describing. Prepend
13
- # we'll prepend information about the dimensions to make it so.
14
- # This array should stay in line with the other arrays. In particular
15
- # it should contain the size of each dimension in the tensor, followed
16
- # by the number of non-zeros.
17
- TENSOR_DIMS=(
18
- " 6186 24 77 32 5330673"
19
- " 1605 4198 1631 4209 868131 1698825"
20
- " 2482 2862 14036 17 3101609"
21
- " 183 24 1140 1717 3309490"
22
- )
23
-
24
12
TENSOR_URLS=(
25
13
" https://s3.us-east-2.amazonaws.com/frostt/frostt_data/chicago-crime/comm/chicago-crime-comm.tns.gz"
26
14
" https://s3.us-east-2.amazonaws.com/frostt/frostt_data/lbnl-network/lbnl-network.tns.gz"
@@ -32,16 +20,11 @@ mkdir -p data/FROSTT
32
20
33
21
for i in ${! TENSOR_URLS[@]} ; do
34
22
name=${TENSOR_NAMES[$i]}
35
- dim=${TENSOR_DIMS[$i]}
36
23
url=${TENSOR_URLS[$i]}
37
- outdir =" data/FROSTT/$name "
38
- if [ -d " $outdir " ]; then
24
+ out =" data/FROSTT/$name .tns "
25
+ if [ -f " $out " ]; then
39
26
continue
40
27
fi
41
- echo " Downloading tensor $name to $outdir "
42
- mkdir " $outdir "
43
- # Write the dimension to the file.
44
- echo " $dim " > " $outdir /tensor.frostt"
45
- # Append the rest of the data to the file.
46
- curl $url | gzip -d -c >> " $outdir /tensor.frostt"
28
+ echo " Downloading tensor $name to $out "
29
+ curl $url | gzip -d -c > " $out "
47
30
done
0 commit comments