How to use TemporalRowConvolution

I have found that there is a TemporaRowConvilution implementation in C available here: https://github.com/pytorch/pytorch/blob/master/torch/lib/THNN/generic/TemporalRowConvolution.c

How it is possible to use it from pytorch? Should I write cffi extension? Would appreciate any advice/direction! Thank you in advance.

It is indeed not exposed.
You can access it via something like this which is an autogenerated binding: https://github.com/pytorch/pytorch/blob/master/torch/nn/functional.py#L473

 torch.nn._functions.thnn.auto.TemporalRowConvolution.forward
 torch.nn._functions.thnn.auto.TemporalRowConvolution.backward
 torch.nn._functions.thnn.auto.TemporalRowConvolution.apply

These should be available, but we haven’t exposed them as PyTorch nn modules yet.

can I have an example?

self.trc = torch.nn._functions.thnn.auto.TemporalRowConvolution(rnn_input_size, 5)

x = self.trc(x)

yields

ValueError: missing required argument ‘weight’