Skip to content

Commit

Permalink
fix(csvts/torch): allow to read csv timeserie directly from query
Browse files Browse the repository at this point in the history
  • Loading branch information
fantes authored and sileht committed Oct 13, 2020
1 parent d6749d0 commit 76023db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/backends/torch/torchinputconns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,9 @@ namespace dd
std::vector<at::Tensor> label_sequence;

tstart = seq.size() - _timesteps;
_ids.push_back(_fnames[vecindex] + " #" + std::to_string(tstart)
+ "_" + std::to_string(tstart + _timesteps - 1));
if (_fnames.size() > static_cast<unsigned int>(vecindex))
_ids.push_back(_fnames[vecindex] + " #" + std::to_string(tstart)
+ "_" + std::to_string(tstart + _timesteps - 1));
for (int ti = tstart; ti < tstart + _timesteps; ++ti)
{
std::vector<double> datavec;
Expand Down

0 comments on commit 76023db

Please sign in to comment.