NeuralNetworkVerification / Marabou

Other
239 stars 86 forks source link

Deprecated Tensorflow example in maraboupy tutorial #775

Closed yizhake closed 3 months ago

yizhake commented 3 months ago

The Tensorflow example in maraboupy tutorial is deprecated.

When running the code in Tensorflow Example in maraboupy tutorial, it fails with the following error:

File Marabou/maraboupy/Marabou.py:62, in read_tf(filename, inputNames, outputNames, modelType, savedModelTags)
     47 def read_tf(filename, inputNames=None, outputNames=None, modelType="frozen", savedModelTags=[]):
     48     """Constructs a MarabouNetworkTF object from a frozen Tensorflow protobuf
     49 
     50     Args:
   (...)
     60         :class:`~maraboupy.MarabouNetworkTF.MarabouNetworkTF`
     61     """
---> 62     return MarabouNetworkTF(filename, inputNames, outputNames, modelType, savedModelTags)

NameError: name 'MarabouNetworkTF' is not defined
yizhake commented 3 months ago

So, the error typically happens when importing headers in MarabouNetworkTF.py fails. They failed since I had no tensorflow in the virtual environment. Closing the issue. Thanks @wu-haoze !