forked from 626_privacy/tensorflow_privacy
Merge pull request #57 from jvmancuso:qadapt-nest-ver
PiperOrigin-RevId: 259592947
This commit is contained in:
commit
28fd879864
1 changed files with 5 additions and 1 deletions
|
@ -26,6 +26,7 @@ from __future__ import division
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
|
|
||||||
|
@ -33,7 +34,10 @@ from privacy.dp_query import dp_query
|
||||||
from privacy.dp_query import gaussian_query
|
from privacy.dp_query import gaussian_query
|
||||||
from privacy.dp_query import normalized_query
|
from privacy.dp_query import normalized_query
|
||||||
|
|
||||||
nest = tf.contrib.framework.nest
|
if LooseVersion(tf.__version__) < LooseVersion('2.0.0'):
|
||||||
|
nest = tf.contrib.framework.nest
|
||||||
|
else:
|
||||||
|
nest = tf.nest
|
||||||
|
|
||||||
|
|
||||||
class QuantileAdaptiveClipSumQuery(dp_query.DPQuery):
|
class QuantileAdaptiveClipSumQuery(dp_query.DPQuery):
|
||||||
|
|
Loading…
Reference in a new issue