Channels last with Conv1d

Is possible to use a channel last memory layout with libtorch? I see it’s possible with PyTorch (beta) Channels Last Memory Format in PyTorch — PyTorch Tutorials 1.12.1+cu102 documentation but I don’t see a torch::channels_last or anything with ConvFuncOption.

You could use at::MemoryFormat::ChannelsLast in C++.

Do you have an example @ptrblck conv->to takes either a torch::Dtype or a torch::Device?

I think you could use x.contiguous(at::MemoryFormat::ChannelsLast);