ADD file via upload

This commit is contained in:
p87059431 2023-11-16 13:00:51 +08:00
parent d328e524b7
commit 79c000b521
1 changed files with 33 additions and 0 deletions

33
secureJoin.py Normal file
View File

@ -0,0 +1,33 @@
#!/usr/bin/env python3
import sys
import multiprocessing
import numpy as np
def doprocess(id):
import time
sys.argv.extend(["--node_id", "P{}".format(id)])
import latticex.rosetta as rtt
import tensorflow as tf
import numpy as np
rtt.activate("SecureNN")
p0 = multiprocessing.Process(target=doprocess, args=(0,))
p1 = multiprocessing.Process(target=doprocess, args=(1,))
p2 = multiprocessing.Process(target=doprocess, args=(2,))
p0.daemon = True
p0.start()
p1.daemon = True
p1.start()
p2.daemon = True
p2.start()
p0.join()
p1.join()
p2.join()