anishathalye / neural-hash-collider

Preimage attack against NeuralHash 💣
https://twitter.com/anishathalye/status/1428164089231069187
MIT License
664 stars 33 forks source link

[Question] Onnx -> TF #6

Closed IaroslavElistratov closed 1 year ago

IaroslavElistratov commented 1 year ago

Could you please clarify what is the reason for using tf.compat.v1.Session() instead of TF 2 eager execution? Is it related to computing the gradient for the model converted from onnx?

anishathalye commented 1 year ago

Yes, I vaguely recall that this was the easiest way for me to get gradients through the ONNX model. I don't remember if eager mode wasn't supported, or if I just got this version working first and moved on.