CIKM_AnalytiCup_2017 icon indicating copy to clipboard operation
CIKM_AnalytiCup_2017 copied to clipboard

请教:运行报错

Open stsaten6 opened this issue 6 years ago • 3 comments

运行main.py生成train data,最后一条如下:

['train_8152', 13.76, 23.04, 79.52, 0.0, 0.0, 0.0, 95.72, 111.44, 47.6, 23.72, 10.12, 1.92, 128.96, 113.48, 64.28, 10.84, 20.56, 5.72, 120.56, 67.64, 69.6, 75.56, 18.68, 4.0, 15.28, 10.92, 138.44, 98.44, 10.56, 2.0, 11.6, 27.56, 23.24, 74.24, 8.56, 0.88, 18.56, 35.24, 103.16, 2.12, 0.0, 0.0, 122.72, 92.6, 75.8, 30.2, 3.04, 1.52, 123.92, 106.28, 68.72, 12.12, 26.72, 3.04, 127.04, 88.76, 48.52, 84.92, 28.6, 0.0, 22.52, 20.4, 124.48, 128.6, 22.08, 1.76, 10.32, 24.68, 20.08, 88.52, 19.84, 0.0, 52.68, 46.24, 93.44, 1.76, 0.0, 0.0, 116.96, 84.92, 77.36, 25.44, 10.2, 4.8, 118.16, 99.08, 70.04, 30.72, 39.48, 0.0, 130.28, 93.68, 33.2, 120.44, 36.28, 0.0, 29.12, 26.68, 112.64, 142.04, 21.96, 0.0, 10.96, 28.16, 19.8, 70.6, 26.48, 0.0, 61.44, 36.04, 89.6, 3.76, 0.0, 4.8, 128.24, 87.32, 80.48, 38.48, 13.64, 6.64, 112.4, 95.24, 71.24, 55.88, 50.96, 8.4, 127.28, 96.8, 21.08, 133.28, 60.92, 6.2, 31.16, 25.64, 67.04, 130.16, 44.96, 0.0, 20.28, 24.32, 27.8, 71.16, 42.04, 1.04, 94.48, 64.28, 81.92, 18.72, 0.0, 2.2, 134.24, 90.2, 93.92, 43.64, 4.76, 9.56, 102.68, 91.76, 75.44, 58.64, 68.48, 10.72, 135.8, 98.0, 33.8, 130.76, 78.44, 7.44, 27.12, 21.08, 72.8, 124.16, 43.76, 0.0, 21.2, 22.2, 16.8, 75.92, 41.12, 69.16, 116.76, 73.16, 82.04, 40.56, 0.0, 0.0, 132.32, 97.52, 115.04, 71.6, 18.44, 0.0, 87.32, 90.32, 83.84, 74.48, 105.68, 11.0, 129.2, 91.4, 17.44, 124.52, 87.08, 18.88, 23.8, 15.88, 32.28, 124.52, 76.84, 26.04, 19.52, 23.0, 30.72, 56.32, 61.52, 122.6, 129.32, 95.6, 101.36, 44.44, 0.0, 0.0, 118.16, 90.56, 127.4, 72.68, 54.08, 1.92, 57.84, 81.92, 86.48, 97.4, 138.68, 26.16, 114.32, 79.28, 41.56, 132.2, 112.88, 46.96, 30.88, 22.16, 13.24, 97.16, 81.2, 52.36, 23.36, 25.4, 41.96, 39.4, 59.96, 110.48, 131.36, 105.8, 114.08, 31.28, 0.0, 2.64, 113.48, 110.24, 137.72, 71.84, 59.36, 0.0, 35.96, 66.68, 79.4, 96.08, 140.48, 16.6, 109.68, 68.72, 61.88, 124.4, 126.8, 58.6, 33.52, 2.56, 15.2, 101.0, 84.68, 51.92, 17.56, 22.52, 36.92, 11.72, 60.88, 118.4, 136.28, 137.84, 133.4, 23.16, 7.64, 0.0, 118.64, 117.68, 135.32, 70.76, 57.56, 3.76, 55.56, 63.08, 81.56, 144.44, 128.72, 17.76, 108.44, 72.8, 55.28, 117.44, 110.72, 80.76, 36.68, 8.4, 8.0, 94.16, 83.96, 54.32, 24.24, 23.12, 36.16, 4.48, 79.08, 129.32, 137.0, 147.2, 136.64, 60.56, 5.12, 0.0, 118.16, 114.32, 132.68, 80.36, 61.76, 2.4, 20.4, 59.6, 81.32, 148.4, 134.72, 41.68, 93.36, 75.32, 65.24, 113.6, 107.72, 97.08, 26.36, 19.64, 9.16, 78.88, 83.6, 59.12, 28.88, 25.4, 44.32, 20.48, 64.28, 125.96, 131.12, 145.64, 140.72, 86.52, 4.52, 0.76, 122.24, 84.2, 120.2, 109.28, 103.88, 1.92, 23.84, 53.84, 86.24, 132.2, 150.32, 71.8, 79.16, 72.68, 57.2, 79.72, 116.24, 88.04, 39.84, 45.84, 14.24, 25.0, 89.96, 88.16, 33.8, 51.32, 24.96, 23.12, 62.44, 122.24, 127.08, 156.92, 138.08, 81.32, 15.8, 0.0, 110.72, 75.92, 106.04, 114.68, 117.44, 59.36, 47.4, 26.56, 76.64, 133.76, 148.88, 71.24, 60.8, 61.4, 46.92, 65.72, 125.6, 92.84, 42.8, 38.44, 52.68, 8.28, 83.0, 106.28, 30.92, 56.6, 38.24, 0.0, 45.2, 106.84, 6.5]

之后就会报错,请教下是什么问题?报错信息信息如下: File "/home/simon/source/code/CIKM-Cup-2017-master/huaibeicun/model/main.py", line 64, in check_code('all','no')

File "/home/simon/source/code/CIKM-Cup-2017-master/huaibeicun/model/main.py", line 26, in check_code train_add = dp.dataprocess(trainfile, data_type='train', windversion='old')

File "../dataprocess/data_process8.py", line 280, in dataprocess id_label, con_mat = train_convolution(line, data_type)

File "../dataprocess/data_process8.py", line 220, in train_convolution mat = np.array(record).reshape(15,4,101,101)

ValueError: cannot reshape array of size 251031 into shape (15,4,101,101)

stsaten6 avatar Jan 27 '18 06:01 stsaten6

这个代码应该没有问题,git clone后,可以直接跑的,你是不是改什么参数了?

zxth93 avatar Jan 28 '18 11:01 zxth93

知道了,数据文件比较大,拷贝的时候没传完,所以报错了。重新下载解压过后可以运行了。

stsaten6 avatar Jan 29 '18 10:01 stsaten6

谢谢您的答复!

stsaten6 avatar Jan 29 '18 10:01 stsaten6