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()
def relu(self, inplace=False): return securenn.relu(self)
def relu(self): return securenn.relu(self)