You could profile the method to read the data as well as create the windows from these tensors and check where most of the time is spent.
Once you’ve isolated it, you could try to accelerate the code (e.g. with a 3rd party library if possible) or think about changing the overall data loading (e.g. would it be possible to store the data in another format and only load the desired window instead of the whole data array).
For a more general advice have a look at this post.
1 Like