How to load customer data in libtorch

username: duola
cooked: <p>Hi everyone, i prepared my data in a txt, and load my data to a vector , but i don’t know how to transfer the vector to tensor , does anyone can help me? or do you have a working example about how to load customer data in libtorch? Thansk very much!<br>
My data is like this</p>
<div class="md-table">
<table>
<thead>
<tr>
<th>1</th>
<th>689.4757</th>
<th>23269.80488</th>
<th>52317.88778</th>
<th>3.014618183</th>
<th>288.084987</th>
<th>44.1984693</th>
</tr>
</thead>
<tbody>
<tr>
<td>2</td>
<td>1551.320325</td>
<td>21373.7467</td>
<td>45142.28644</td>
<td>24.56772949</td>
<td>177.9067883</td>
<td>120.3533858</td>
</tr>
<tr>
<td>3</td>
<td>1539.993224</td>
<td>21373.7467</td>
<td>43408.62695</td>
<td>29.13191777</td>
<td>142.9295824</td>
<td>136.4111031</td>
</tr>
<tr>
<td>4</td>
<td>1528.666123</td>
<td>20684.271</td>
<td>42337.51376</td>
<td>17.35518505</td>
<td>92.2126338</td>
<td>121.7842715</td>
</tr>
<tr>
<td>5</td>
<td>1517.339023</td>
<td>18615.8439</td>
<td>40610.48653</td>
<td>16.453617</td>
<td>92.84858299</td>
<td>148.6531252</td>
</tr>
<tr>
<td>6</td>
<td>1506.011922</td>
<td>16030.31003</td>
<td>38612.93279</td>
<td>18.82023314</td>
<td>109.2242749</td>
<td>171.7062836</td>
</tr>
<tr>
<td>7</td>
<td>1494.684821</td>
<td>14134.25185</td>
<td>36722.0288</td>
<td>19.10197316</td>
<td>106.9984527</td>
<td>173.2961566</td>
</tr>
<tr>
<td>8</td>
<td>1483.35772</td>
<td>12410.5626</td>
<td>34595.2752</td>
<td>18.42579712</td>
<td>92.3716211</td>
<td>164.5518551</td>
</tr>
<tr>
<td>9</td>
<td>1472.03062</td>
<td>11721.0869</td>
<td>33356.81051</td>
<td>17.21431505</td>
<td>77.42681493</td>
<td>146.7452776</td>
</tr>
<tr>
<td>10</td>
<td>1460.703519</td>
<td>11031.6112</td>
<td>32546.71939</td>
<td>16.00283297</td>
<td>69.31846265</td>
<td>138.6369253</td>
</tr>
<tr>
<td>11</td>
<td>1449.376418</td>
<td>10342.1355</td>
<td>31821.36265</td>
<td>15.35483093</td>
<td>65.97972935</td>
<td>130.528573</td>
</tr>
<tr>
<td>12</td>
<td>1438.049317</td>
<td>10514.50443</td>
<td>31819.29811</td>
<td>13.94613085</td>
<td>56.44049137</td>
<td>111.7680717</td>
</tr>
<tr>
<td>13</td>
<td>1426.722216</td>
<td>11548.71798</td>
<td>32653.10349</td>
<td>10.84699066</td>
<td>39.90581221</td>
<td>92.2126338</td>
</tr>
<tr>
<td>14</td>
<td>1415.395116</td>
<td>9307.92195</td>
<td>30574.35619</td>
<td>13.52352082</td>
<td>53.57871998</td>
<td>114.9478176</td>
</tr>
<tr>
<td>15</td>
<td>1404.068015</td>
<td>9135.553025</td>
<td>30232.80911</td>
<td>12.56560476</td>
<td>46.7422661</td>
<td>102.2288337</td>
</tr>
<tr>
<td>16</td>
<td>1392.740914</td>
<td>8790.815175</td>
<td>29904.74995</td>
<td>11.86125472</td>
<td>44.039482</td>
<td>100.797948</td>
</tr>
<tr>
<td>17</td>
<td>1381.413813</td>
<td>8790.815175</td>
<td>29892.38411</td>
<td>11.01603467</td>
<td>40.54176141</td>
<td>93.48453219</td>
</tr>
<tr>
<td>18</td>
<td>1370.086712</td>
<td>9307.92195</td>
<td>31322.66857</td>
<td>9.015680548</td>
<td>48.49112639</td>
<td>78.85770063</td>
</tr>
<tr>
<td>19</td>
<td>1358.759612</td>
<td>9307.92195</td>
<td>31388.43546</td>
<td>11.01603467</td>
<td>61.21011036</td>
<td>89.3508624</td>
</tr>
<tr>
<td>20</td>
<td>1347.432511</td>
<td>8963.1841</td>
<td>29823.66802</td>
<td>9.607334584</td>
<td>31.32049803</td>
<td>78.69871333</td>
</tr>
<tr>
<td>21</td>
<td>1336.10541</td>
<td>12410.5626</td>
<td>34153.4695</td>
<td>3.155488192</td>
<td>6.359491986</td>
<td>25.43796794</td>
</tr>
<tr>
<td>22</td>
<td>1324.778309</td>
<td>9480.290875</td>
<td>30508.8149</td>
<td>8.762114533</td>
<td>28.93568854</td>
<td>86.64807831</td>
</tr>
<tr>
<td>23</td>
<td>1313.451209</td>
<td>9135.553025</td>
<td>30271.75316</td>
<td>9.184724558</td>
<td>33.22834563</td>
<td>83.15035772</td>
</tr>
<tr>
<td>24</td>
<td>1302.124108</td>
<td>8963.1841</td>
<td>30351.26544</td>
<td>9.128376555</td>
<td>38.15695192</td>
<td>73.61111974</td>
</tr>
<tr>
<td>25</td>
<td>1290.797007</td>
<td>7928.97055</td>
<td>29124.98256</td>
<td>9.184724558</td>
<td>35.13619322</td>
<td>80.60656092</td>
</tr>
<tr>
<td>26</td>
<td>1279.469906</td>
<td>7584.2327</td>
<td>28722.60978</td>
<td>8.959332545</td>
<td>33.38733293</td>
<td>79.65263712</td>
</tr>
<tr>
<td>27</td>
<td>1268.142805</td>
<td>7584.2327</td>
<td>28518.63015</td>
<td>8.452200514</td>
<td>28.14075204</td>
<td>75.20099273</td>
</tr>
<tr>
<td>28</td>
<td>1256.815705</td>
<td>7584.2327</td>
<td>28441.39867</td>
<td>8.762114533</td>
<td>28.93568854</td>
<td>72.97517054</td>
</tr>
<tr>
<td>29</td>
<td>1245.488604</td>
<td>7239.49485</td>
<td>27206.697</td>
<td>8.424026512</td>
<td>15.42176807</td>
<td>73.29314514</td>
</tr>
<tr>
<td>30</td>
<td>1234.161503</td>
<td>6825.80943</td>
<td>28778.44985</td>
<td>8.2268085</td>
<td>44.9934058</td>
<td>72.97517054</td>
</tr>
<tr>
<td>31</td>
<td>1222.834402</td>
<td>6894.757</td>
<td>27564.72623</td>
<td>8.762114533</td>
<td>27.02784094</td>
<td>72.65719594</td>
</tr>
<tr>
<td>32</td>
<td>1211.507301</td>
<td>8618.44625</td>
<td>30445.17942</td>
<td>5.493930334</td>
<td>12.24202207</td>
<td>44.5164439</td>
</tr>
<tr>
<td>33</td>
<td>1200.180201</td>
<td>5515.8056</td>
<td>25530.64352</td>
<td>9.269246563</td>
<td>17.17062836</td>
<td>92.84858299</td>
</tr>
<tr>
<td>34</td>
<td>1188.8531</td>
<td>5515.8056</td>
<td>26216.10664</td>
<td>9.607334584</td>
<td>34.34125672</td>
<td>76.79086573</td>
</tr>
<tr>
<td>35</td>
<td>1177.525999</td>
<td>5343.436675</td>
<td>26128.93031</td>
<td>8.649418526</td>
<td>30.84353613</td>
<td>74.72403083</td>
</tr>
<tr>
<td>36</td>
<td>1166.198898</td>
<td>5171.06775</td>
<td>25364.30285</td>
<td>8.170460497</td>
<td>19.07847596</td>
<td>77.26782763</td>
</tr>
<tr>
<td>37</td>
<td>1154.871798</td>
<td>5240.01532</td>
<td>25733.47489</td>
<td>7.860546478</td>
<td>23.68910765</td>
<td>61.21011036</td>
</tr>
<tr>
<td>38</td>
<td>1143.544697</td>
<td>4826.3299</td>
<td>25957.57523</td>
<td>7.888720479</td>
<td>34.50024402</td>
<td>67.25162775</td>
</tr>
<tr>
<td>39</td>
<td>1132.217596</td>
<td>4826.3299</td>
<td>25502.64643</td>
<td>7.691502467</td>
<td>26.55087904</td>
<td>66.93365315</td>
</tr>
<tr>
<td>40</td>
<td>1120.890495</td>
<td>4826.3299</td>
<td>25697.55231</td>
<td>7.494284455</td>
<td>28.45872664</td>
<td>65.02580556</td>
</tr>
<tr>
<td>41</td>
<td>1109.563394</td>
<td>4826.3299</td>
<td>25497.35103</td>
<td>7.156196435</td>
<td>19.71442516</td>
<td>61.84605956</td>
</tr>
<tr>
<td>42</td>
<td>1098.236294</td>
<td>5171.06775</td>
<td>26396.67194</td>
<td>6.367324387</td>
<td>20.50936165</td>
<td>61.21011036</td>
</tr>
<tr>
<td>43</td>
<td>1086.909193</td>
<td>4826.3299</td>
<td>26268.7702</td>
<td>6.649064404</td>
<td>20.66834895</td>
<td>54.53264378</td>
</tr>
<tr>
<td>44</td>
<td>1075.582092</td>
<td>4481.59205</td>
<td>24608.22169</td>
<td>7.07167443</td>
<td>4.769618989</td>
<td>66.45669125</td>
</tr>
<tr>
<td>45</td>
<td>1064.254991</td>
<td>4309.223125</td>
<td>25307.77357</td>
<td>6.930804421</td>
<td>28.29973934</td>
<td>63.59491986</td>
</tr>
<tr>
<td>46</td>
<td>1052.92789</td>
<td>4309.223125</td>
<td>25417.84779</td>
<td>6.620890402</td>
<td>23.84809495</td>
<td>58.50732627</td>
</tr>
<tr>
<td>47</td>
<td>1041.60079</td>
<td>4136.8542</td>
<td>25075.2677</td>
<td>6.620890402</td>
<td>24.00708225</td>
<td>61.21011036</td>
</tr>
<tr>
<td>48</td>
<td>1030.273689</td>
<td>4136.8542</td>
<td>25363.33851</td>
<td>6.339150385</td>
<td>19.23746326</td>
<td>58.03036437</td>
</tr>
<tr>
<td>49</td>
<td>1018.946588</td>
<td>5171.06775</td>
<td>28286.08222</td>
<td>4.789580291</td>
<td>12.08303477</td>
<td>31.00252343</td>
</tr>
<tr>
<td>50</td>
<td>1007.619487</td>
<td>4481.59205</td>
<td>27064.56072</td>
<td>4.845928295</td>
<td>15.89872996</td>
<td>45.3113804</td>
</tr>
<tr>
<td>51</td>
<td>996.2923865</td>
<td>3240.53579</td>
<td>23791.13918</td>
<td>6.90263042</td>
<td>23.05315845</td>
<td>58.82530087</td>
</tr>
<tr>
<td>52</td>
<td>984.9652857</td>
<td>2930.271725</td>
<td>23338.64946</td>
<td>8.029590488</td>
<td>32.11543453</td>
<td>72.97517054</td>
</tr>
<tr>
<td>53</td>
<td>973.6381849</td>
<td>3102.64065</td>
<td>22517.61299</td>
<td>8.931158543</td>
<td>23.21214575</td>
<td>56.44049137</td>
</tr>
<tr>
<td>54</td>
<td>962.3110841</td>
<td>3102.64065</td>
<td>24546.79287</td>
<td>6.029236366</td>
<td>20.03239976</td>
<td>52.94277078</td>
</tr>
<tr>
<td>55</td>
<td>950.9839834</td>
<td>2930.271725</td>
<td>24436.37761</td>
<td>5.888366358</td>
<td>22.73518385</td>
<td>52.46580888</td>
</tr>
<tr>
<td>56</td>
<td>939.6568826</td>
<td>2930.271725</td>
<td>24321.20169</td>
<td>6.001062365</td>
<td>21.46328545</td>
<td>52.94277078</td>
</tr>
</tbody>
</table>
</div>