dragonn
dragonn copied to clipboard
issue when running dragonn train...
Dear all, When I run
dragonn train --pos-sequences examples/example_pos_sequences.fa --neg-sequences examples/example_neg_sequences.fa --prefix training_example
I have met some errors as below:
loading sequence data...
initializing model...
Using TensorFlow backend.
2017-11-10 11:37:29.950537: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-11-10 11:37:29.950571: 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.
2017-11-10 11:37:29.950577: 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.
2017-11-10 11:37:29.950581: 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.
2017-11-10 11:37:29.950585: 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.
Traceback (most recent call last):
File "/anaconda2/bin/dragonn", line 11, in <module>
load_entry_point('dragonn==0.1.3', 'console_scripts', 'dragonn')()
File "build/bdist.macosx-10.6-x86_64/egg/dragonn/__main__.py", line 203, in main
File "build/bdist.macosx-10.6-x86_64/egg/dragonn/__main__.py", line 94, in main_train
File "build/bdist.macosx-10.6-x86_64/egg/dragonn/models.py", line 112, in __init__
File "/anaconda2/lib/python2.7/site-packages/Keras-0.3.3-py2.7.egg/keras/models.py", line 522, in compile
train_loss = weighted_loss(self.y, self.y_train, self.weights, mask)
File "/anaconda2/lib/python2.7/site-packages/Keras-0.3.3-py2.7.egg/keras/models.py", line 82, in weighted
score_array = fn(y_true, y_pred)
File "/anaconda2/lib/python2.7/site-packages/Keras-0.3.3-py2.7.egg/keras/objectives.py", line 40, in binary_crossentropy
return K.mean(K.binary_crossentropy(y_pred, y_true), axis=-1)
File "/anaconda2/lib/python2.7/site-packages/Keras-0.3.3-py2.7.egg/keras/backend/tensorflow_backend.py", line 606, in binary_crossentropy
return tf.nn.sigmoid_cross_entropy_with_logits(output, target)
File "/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/nn_impl.py", line 147, in sigmoid_cross_entropy_with_logits
_sentinel, labels, logits)
File "/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/nn_ops.py", line 1562, in _ensure_xent_args
"named arguments (labels=..., logits=..., ...)" % name)
ValueError: Only call `sigmoid_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)
Anyone who has the same problem? Please help me. Thank you
I'm pretty sure that's happening because dragonn
is built on an older version of keras
(0.3.2 I think) which is designed for an older version of Tensorflow (<1.0), when it didn't require named arguments to that function. To avoid dealing with all that, you can tell keras
to use Theano as the backend by editing the file ~/.keras/keras.json
.
we are in the process of updating dragonn
and associated dependencies to use more recent version of keras
with tensorflow
as the backend for keras
and deeplift
.
vim ~/.keras/keras.json
"backend": "theano"
and then save it.
and then "pip install theano==0.8"
Just do it!