Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue when running dragonn train... #42

Open
hainguyenct opened this issue Nov 10, 2017 · 3 comments
Open

issue when running dragonn train... #42

hainguyenct opened this issue Nov 10, 2017 · 3 comments

Comments

@hainguyenct
Copy link

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

@kiminsigne-ucla
Copy link
Contributor

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.

@jisraeli
Copy link
Contributor

jisraeli commented Feb 14, 2018

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.

@Licko0909
Copy link

vim ~/.keras/keras.json

"backend": "theano"

and then save it.

and then "pip install theano==0.8"

Just do it!

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants