Shortcuts

Typedef torch::data::transforms::Collate

Typedef Documentation

template<typename T, typename BatchType = std::vector<T>>
using torch::data::transforms::Collate = BatchLambda<BatchType, T>

A Collate allows passing a custom function to reduce/collate a batch into a single value.

It’s effectively the lambda version of Collation, which you could subclass and override operator() to achieve the same.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources