Skip to content

[core] Tensor copy constructor behavior

What is the expected behavior of a Tensor copy in presence of padding data? Or when the Tensor is only a view of a larger one?

  • 1 copy all the available in-memory data
  • 2 copy only the data of interest (leading to a possibly smaller tensor in memory?)

Current behavior: 1 Recommended behavior (according to me): 2

Solution 2 will require a new special constructor for the case where the user may want to copy a wider area (keeping padding or context for instance)

Edited by Maxence Naud