latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.utils.data.default_convert
- tensorplay.utils.data.default_convert(data)[source]
Convert each NumPy array element into a
tensorplay.Tensor.If the input is a Sequence, Collection, or Mapping, it tries to convert each element inside to a
tensorplay.Tensor. If the input is not a NumPy array, it is left unchanged. This is used as the default function for collation when both batch_sampler and batch_size are NOT defined inDataLoader.- Parameters:
data – a single data point to be converted
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

