Relative Content

Tag Archive for pytorchcombinatoricstorch

I want to obtain a tensor with all possible combination of the rows of a matrix in Torch

I have a tensor of 4 dimensions let#s call them N,T,V,C, now I would like to have a tensor of dimension N,T,C^V, or better N,T,C,C,…,C for V times, where the elements are the outher products of the V,C matrix rows for each N,T. I am in a nn.module enviroment with parameters associated so I have to use torch functions and all needed to then be able to do the gradient of the parameters.
Thanks