Pysyft: Sigmoid in SMPC failing for some shapes

Created on 2 Mar 2020  路  3Comments  路  Source: OpenMined/PySyft

Describe the bug
Examples to illustrate:

Working

a = torch.Tensor([1,2,3])
a = a.fix_precision().share(bob, alice, crypto_provider = crypto_provider, requires_grad = True)
torch.nn.Sigmoid()(a)

Not working

a = torch.Tensor([[1,2,3],[4,5,6]])
a = a.fix_precision().share(bob, alice, crypto_provider = crypto_provider, requires_grad = True)
torch.nn.Sigmoid()(a)

Error: AssertionError: Must be batches of square matrices

(same with requires_grad=False)

The error seems linked to tensor shape

Most helpful comment

Might need to add a test for this.

All 3 comments

It worked before by the way. Like a month ago

Might need to add a test for this.

I can take it @LaRiffle

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deevashwer picture deevashwer  路  4Comments

swaroopch picture swaroopch  路  4Comments

MetaT1an picture MetaT1an  路  3Comments

s-marta picture s-marta  路  4Comments

iamtrask picture iamtrask  路  4Comments