Esempio n. 1
0
def test_relu(workers):
    alice, bob, james = (
        workers["alice"],
        workers["bob"],
        workers["james"],
    )
    tensorA = (torch.tensor([-10, 0, 10]).share(alice,
                                                bob,
                                                crypto_provider=james,
                                                dtype="long").child)
    assert (securenn.relu(tensorA).get() == torch.tensor([0, 0, 10])).all()
Esempio n. 2
0
 def relu(self, inplace=False):
     return securenn.relu(self)
Esempio n. 3
0
 def relu(self):
     return securenn.relu(self)