Skip to content

Commit

Permalink
Fix compatibility (#864)
Browse files Browse the repository at this point in the history
* fix shape concatenation for tf 1.13.2

* rm tf-big dep

Co-authored-by: Zhicong (Zico) Huang <zhicong.hzc@alibaba-inc.com>
  • Loading branch information
zicofish and Zhicong (Zico) Huang committed Aug 30, 2022
1 parent 8661ba8 commit ed3e3ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -17,7 +17,7 @@
"tensorflow >=1.12.0, <2",
"numpy >=1.14.0",
"pyyaml >=5.1",
"tf-big ~=0.1.0",
# "tf-big ~=0.1.0",
],
extras_require={
"tf": ["tensorflow>=1.12.0,<2"],
Expand Down
5 changes: 4 additions & 1 deletion tf_encrypted/protocol/aby3/aby3.py
Expand Up @@ -921,7 +921,10 @@ def _share(self, secret: AbstractTensor, share_type: str, player=None):

with tf.name_scope("share"):
if share_type == ShareType.ARITHMETIC or share_type == ShareType.BOOLEAN:
randoms = secret.factory.sample_uniform([2] + secret.shape)
secret_shape = secret.shape
if isinstance(secret_shape, tf.TensorShape):
secret_shape = secret_shape.as_list()
randoms = secret.factory.sample_uniform([2] + secret_shape)
share0 = randoms[0]
share1 = randoms[1]
if share_type == ShareType.ARITHMETIC:
Expand Down

0 comments on commit ed3e3ff

Please sign in to comment.