Skip to content

Commit

Permalink
feat(torch): in case of timeseries, warn if file do not contain enoug…
Browse files Browse the repository at this point in the history
…h timesteps
  • Loading branch information
fantes authored and sileht committed Oct 5, 2020
1 parent d37e182 commit 1a5f905
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/backends/torch/torchinputconns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,13 @@ namespace dd
{
vecindex++;
long int tstart = 0;
if (static_cast<long int>(seq.size()) < _timesteps)
{
_tilogger->warn(
"file " + _fnames[vecindex]
+ " does not contains enough timesteps, discarding");
continue;
}
for (; tstart + _timesteps < static_cast<long int>(seq.size());
tstart += _offset)
// construct timeseries here , using timesteps and offset from data
Expand Down

0 comments on commit 1a5f905

Please sign in to comment.