cleverhans-lab / cleverhans

An adversarial example library for constructing attacks, building defenses, and benchmarking both
MIT License
6.2k stars 1.39k forks source link

NotImplementedError: must implement `get_logits` or must define a logits output in `fprop` #994

Closed Semizenbora closed 5 years ago

Semizenbora commented 5 years ago

When I try to run "python train.py --env Breakout --noisy --save-dir ./data/Breakout/ --attack fgsm --num-steps 20 --attack-prob 1.0" I get the following error,

Making new env: BreakoutNoFrameskip-v4 PkgResourcesDeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately. result = entry_point.load(False) Logging to ./data/Breakout/ I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 \Anaconda3\envs\tens\lib\site-packages\tensorflow\python\util\decorator_utils.py:127: GraphKeys.VARIABLES (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.GraphKeys.GLOBAL_VARIABLES instead. rl-attack\rlattack\deepq\build_graph.py:296: arg_max (from tensorflow.python.ops.gen_math_ops) is deprecated and will be removed in a future version. Instructions for updating: Use argmax instead Traceback (most recent call last): File "train.py", line 151, in rl-attack\rlattack\deepq\build_graph.py", line 350, in build_train clip_min=0, clip_max=1.0) * 255.0 Anaconda3\envs\tens\lib\site-packages\cleverhans\attacksinit.py", line 346, in generate self.model.get_logits(x), Anaconda3\envs\tens\lib\site-packages\cleverhans\model.py", line 70, in get_logits " output in fprop") NotImplementedError: <class 'cleverhans.model.CallableModelWrapper'>must implement get_logits or must define a logits output in fprop

I am not sure how can I fix this, thank you for any kind of help

npapernot commented 5 years ago

I am closing this because this is neither a bug nor a feature request. Please don't double post on StackOverflow and here. Thanks!