How to parse a struct of THFloatTensor * * into a C extension

I build a C extension using torch.utils.ffi.
One of the C function requires struct THFloatTensor * *.
How to parse struct THFloatTensor * * into python argument?

The error I got:

TypeError: initializer for ctype ‘struct THFloatTensor * *’ must be a pointer to same type, not cdata ‘struct THFloatTensor *’

There’s not enough information in your post to give an answer. What’s your code look like? Somwhere you are parsing a pointer to a pointer as a pointer.

The C code:

void asgbatchfw(THFloatTensor **input,
THLongTensor **target,
THFloatTensor *trans,
THDoubleTensor *falacc,
THLongTensor *falmacc,
THDoubleTensor *falgacc,
THDoubleTensor *fccacc,
THLongTensor *fccmacc,
THDoubleTensor *fccgacc,
THFloatTensor *falscale,
THFloatTensor *fccscale,
THLongTensor *T,
long N,
THLongTensor *TN,
THFloatTensor *loss,
long B)

Then I use torch.utils.ffi to build it.
How can I parse a point of point into asgbatchfw?
Thanks.