Hello everyone.

I am using pysyft with pytorch. The output of a model is then passed to a permutation function that does just the multiplication with permutation Matrix P.

The code is working just fine without the integration of pysyft but for some reason I am getting this error: RuntimeError: matrices expected, got 1D, 2D tensors at /pytorch/aten/src/TH/generic/THTensorMath.cpp:131 when I try to do the exactly the same with pysyft.

Any help?? I would appreciate

Could you check your code for any usage of `squeeze()`

?

If you don’t pass a `dim`

argument to this method, all dimensions with a size of 1 will be removed.

I don’t know how you are using `pysift`

, but could the batch size be reduced to 1, which would then remove this dimension via `squeeze()`

?

1 Like

I don’t seem to understand what you said exactly can u explain more ? But for sure I am not using the `squeeze`

function

Thanks for the information. Could you post a code snippet, which would create this issue, so that we can debug further?