I used the following to install cleverhans
in Colab
:
!pip install -qq -e git+http://github.com/tensorflow/cleverhans.git#egg=cleverhans
import sys
sys.path.append('/content/src/cleverhans')
import cleverhans
And it seems to work good. Then I use the following:
from cleverhans.utils_keras import KerasModelWrapper
wrap = KerasModelWrapper(network)
And I get:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-42-bf6d85d04ab3> in <module>()
----> 1 from cleverhans.utils_keras import KerasModelWrapper
2 wrap = KerasModelWrapper(network)
ModuleNotFoundError: No module named 'cleverhans.utils_keras'
Module
cleverhans.utils_keras
is a part of cleverhans_v3.1.0. The subdirectory has its ownsetup.py
, i.e. it's its own separate package. Install it with the command