Rate this Page

Template Struct Stack< Example< > >#

Inheritance Relationships#

Base Type#

Struct Documentation#

template<>
struct Stack<Example<>> : public torch::data::transforms::BatchTransform<Example<>>#

A Collation for Example<Tensor, Tensor> types that stacks all data tensors into one tensor, and all target (label) tensors into one tensor.

Public Functions

inline Example apply_batch(std::vector<Example<>> examples) override#