lfads / lfads-run-manager

Matlab interface for Latent Factor Analysis via Dynamical Systems (LFADS)
https://lfads.github.io/lfads-run-manager
Apache License 2.0
50 stars 29 forks source link

Error when running lfads_train.sh #13

Closed julianamengual closed 5 years ago

julianamengual commented 5 years ago

Hello,

I am trying to run the lfads_train.sh in a single session only to test, and I got an error that I don't really know how to solve (last line). Here I copy-paste the output that I get by the run.

I would really appreciate getting any input on it

Thanks a lot

Julian

1 datasets loaded Found training set with number examples: 664 Found validation set with number examples: 166 2019-01-17 12:55:41.694200: 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. 2019-01-17 12:55:41.694242: 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. 2019-01-17 12:55:41.694256: 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. 2019-01-17 12:55:41.694268: 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. 2019-01-17 12:55:41.694280: 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. Building graph... /home/common/jamengual/LFADS/models/research/lfads/lfads.py:323: FutureWarning: Conversion of the second argument of issubdtype from int to np.signedinteger is deprecated. In future, it will be treated as np.int64 == np.dtype(int).type. datasets[hps.dataset_names[0]]['train_data'].dtype, int), \ Traceback (most recent call last): File "/home/common/jamengual/LFADS/models/research/lfads/run_lfads.py", line 814, in tf.app.run() File "/home/amengual/anaconda3/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "/home/common/jamengual/LFADS/models/research/lfads/run_lfads.py", line 798, in main train(hps, datasets) File "/home/common/jamengual/LFADS/models/research/lfads/run_lfads.py", line 604, in train model = build_model(hps, kind="train", datasets=datasets) File "/home/common/jamengual/LFADS/models/research/lfads/run_lfads.py", line 424, in build_model model = LFADS(hps, kind=build_kind, datasets=datasets) File "/home/common/jamengual/LFADS/models/research/lfads/lfads.py", line 493, in init this_in_fac_W = tf.case(pf_pairs_in_fac_Ws, exclusive=True) TypeError: case() takes at least 2 arguments (2 given)

djoshea commented 5 years ago

Sorry that you're having trouble, Julian. Hmm, I can't say I've ever seen this issue before, and I can't really understand what's going on from the traceback either. It also doesn't seem like the API for tf.case has changed recently either. According to , tf.case should take one required argument not two. Can you check the version of Tensorflow you're using?

python -c 'import tensorflow as tf; print(tf.__version__)'

I'll try to run the single session example locally and make sure nothing has broken in the most recent Tensorflow.

julianamengual commented 5 years ago

Hello,

Thanks for your reply. I updated the version of the tensorflow and now I have the version 1.10

However, when I run the script again I got the following (and different) error:

Traceback (most recent call last): File "/home/common/jamengual/LFADS/models/research/lfads/run_lfads.py", line 20, in from lfads import LFADS File "/home/common/jamengual/LFADS/models/research/lfads/lfads.py", line 67, in import tensorflow as tf File "/home/amengual/anaconda3/envs/tensorflow/lib/python2.7/site-packages/tensorflow/init.py", line 22, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "/home/amengual/anaconda3/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/init.py", line 52, in from tensorflow.core.framework.graph_pb2 import * File "/home/amengual/anaconda3/envs/tensorflow/lib/python2.7/site-packages/tensorflow/core/framework/graph_pb2.py", line 6, in from google.protobuf import descriptor as _descriptor File "/home/amengual/anaconda3/envs/tensorflow/lib/python2.7/site-packages/google/protobuf/descriptor.py", line 47, in from google.protobuf.pyext import _message ImportError: /home/common/matlab/glnxa64/9.2/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/amengual/anaconda3/envs/tensorflow/lib/python2.7/site-packages/google/protobuf/pyext/_message.so)

I would really appreciate any input of it

Thanks a lot!

Julià L. Amengual

On Fri, 18 Jan 2019 at 20:01, djoshea notifications@github.com wrote:

Sorry that you're having trouble, Julian. Hmm, I can't say I've ever seen this issue before, and I can't really understand what's going on from the traceback either. It also doesn't seem like the API for tf.case has changed recently either. According to , tf.case should take one required argument not two. Can you check the version of Tensorflow you're using?

python -c 'import tensorflow as tf; print(tf.version)'

I'll try to run the single session example locally and make sure nothing has broken in the most recent Tensorflow.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lfads/lfads-run-manager/issues/13#issuecomment-455652494, or mute the thread https://github.com/notifications/unsubscribe-auth/AHKWKuhls_Y4z3tErnZb-TcgzWZG6x0Vks5vEhoTgaJpZM4aFDew .

djoshea commented 5 years ago

Hi Julià, it looks like the issue you're having is getting tensorflow itself to load. Can you try just running

python -c "import tensorflow as tf"

in your terminal? Does this work successfully or throw the same error? If simply importing tensorflow is the issue, you'll need to get it working first, as the problem isn't in LFADS then. We can only offer limited support with this, though there are lots of resources on StackOverflow for people trying to get tensorflow working on their system. If you haven't already, I'd recommend trying the conda tensorflow-gpu install we recommend here, as the pre-built binaries may have fewer issues. If you're already doing that, the only thing I could find for your error message was https://github.com/bazelbuild/bazel/issues/1358 though this seems more related to people building Tensorflow from source.

Hope you're able to track down what's wrong!