Comments (7)
@mahnerak can you fix this?
from cleverhans.
Using TensorFlow backend.
You need to somehow specify which backend to use for Keras. You have to either edit your keras.json config file or run every time like this
KERAS_BACKEND=theano python mnist_tutorial_th.py
from cleverhans.
Because the tutorial works only with the theano backend, you should use an if starement and change the backend if necessary, just as the tensorflow tutorial does
from cleverhans.
Or at least give a useful error message
from cleverhans.
Actually, the TensorFlow version of tutorial changes only image dimension ordering, not a backend for Keras.
If you run mnist_tutorial_tf.py
with Keras configured theano as default backend, you'll get
Using Theano backend.
Using gpu device 0: GeForce GTX 980 (CNMeM is disabled, cuDNN 5005)
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so.7.5 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so.7.5 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so.7.5 locally
INFO: '~/.keras/keras.json' sets 'image_dim_ordering' to 'th', temporarily setting to 'tf'
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
F tensorflow/stream_executor/cuda/cuda_driver.cc:334] current context was not created by the StreamExecutor cuda_driver API: 0x254a160; a CUDA runtime call was likely performed without using a StreamExecutor context
[1] 30067 abort (core dumped) KERAS_BACKEND=theano python mnist_tutorial_tf.py
from cleverhans.
Which one do you prefer? To assert that backend is correct, or change it manually?
If we decide to change backend during runtime, we have to do something like this before importing Keras
os.environ['KERAS_BACKEND']='tensorflow'
Don't know if it's a good idea.
from cleverhans.
from cleverhans.
Related Issues (20)
- projected_gradient_descent() gives an error HOT 1
- bug in CarliniWagnerL2 for tf2 HOT 1
- Saliency Map Method (JSMA) for Cleverhans 4.0? HOT 1
- There is no torch package when use command pip install cleverhans!Why?HELP! HOT 3
- Survey on globally distributed software engineering HOT 1
- Torch implemantation of the fast gradient method HOT 5
- Is there any problem in my code of FGSM and I-FGSM? plz HELP HOT 14
- Adam for PGD / BIM attacks HOT 1
- ModuleNotFoundError: No module named 'cleverhans.utils_tf'
- ModuleNotFoundError: No module named 'cleverhans.attacks' HOT 4
- DeepFool and ElasticNet attacks for TF2 in cleverhans v4.0.0 HOT 1
- Is there code ZOO: Zeroth Order Optimization Based Black-box Attacks to Deep Neural Networks without Training Substitute Models?
- Fast gradient Method doesn't work for double precision: Suggestion for the fix HOT 1
- Predicted Class Labels HOT 1
- Tensorflow 2 C&W2 implementation targeted bug
- Distributed Adversarial Examples Generation
- cleverhans.torch.utils.clip_eta will cause GPU memory leaking for its in-place operation HOT 1
- JAX attacks depend on experimental features that does not exist
- 'get_shape' Attribute
- Missing non-linearity in torch/mnist_tutorial.py HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cleverhans.