interval-bound-propagation
interval-bound-propagation copied to clipboard
Dependency versions
Could you provide a list of dependencies, together with their respective versions, that allows for the code to run? I've tried countless combinations of versions of tensorflow, tensorflow-probability and dm-sonnet and always end up with some import error. Usually either:
AttributeError: module 'tensorflow.python.ops.linalg.linear_operator_util' has no attribute 'matmul_with_broadcast' in tensorflow-probability
or AttributeError: module 'tensorflow.compat.v1' has no attribute 'nest' in attacks.py
Hi,
Thank you for raising this issue. There seems indeed that an incompatibility between the different packages arose. We will try to fix it as soon as possible and update this thread.
Sven
On Tue, 25 Feb 2020 at 21:10 ftramer [email protected] wrote:
Could you provide a list of dependencies, together with their respective versions, that allows for the code to run? I've tried countless combinations of versions of tensorflow, tensorflow-probability and dm-sonnet and always end up with some import error. Usually either:
AttributeError: module 'tensorflow.python.ops.linalg.linear_operator_util' has no attribute 'matmul_with_broadcast' in tensorflow-probability
or AttributeError: module 'tensorflow.compat.v1' has no attribute 'nest' in attacks.py
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/deepmind/interval-bound-propagation/issues/4?email_source=notifications&email_token=AAG5ZYYEPEDKH6K33ZUPHGLREWCKRA5CNFSM4K3SRGGKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IQGH2IQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG5ZY7HE3DPC5RWYC5GERDREWCKRANCNFSM4K3SRGGA .
Hi Florian,
I performed a fresh re-install from HEAD and found that it was necessary to explicitly install tensorflow-probability==0.7.0 after installing dm-sonnet.
The follow clean installation from HEAD works for me, from the interval-bound-propagation working copy directory: pip3 install tensorflow pip3 install dm-sonnet pip3 install tensorflow-probability==0.7.0 pip3 install . python3 examples/train.py
I hope this helps, Robert
Hi Robert,
Thanks this worked, with a few caveats:
-
This doesn't work with the latest Tensorflow (2.1.0). With tensorflow=1.15.0 and dm-sonnet=1.36, the errors disappear
-
There seems to be a mistake in https://github.com/deepmind/interval-bound-propagation/blob/master/examples/eval.py#L235 (double import of
tf.compat.v1
) Replacing this line withsaver = tf.train.Saver(original_predictor.get_variables())
does the trick