Error at swivel.py (Tensorflow Implementation)

101 views
Skip to first unread message

Amir Bakarov

unread,
May 8, 2017, 7:23:09 AM5/8/17
to Swivel Embeddings
I am trying to train the word embeddings that I have got with `prep.py`, and I receive this `ValueError`. How to fix it? I have prepared data from a small corpus of Russian texts - can the language of the data cause this error?

INFO:tensorflow:Reading model from: /home/amir/Documents/vector-model/models/
INFO
:tensorflow:Matrix dim: (94208,94208) SubMatrix dim: (4096,4096)
INFO
:tensorflow:n_submatrices: 529
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.
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.
Traceback (most recent call last):
  File "swivel.py", line 415, in <module>
    tf.app.run()
  File "/home/amir/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 44, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "swivel.py", line 342, in main
    model = SwivelModel(FLAGS)
  File "swivel.py", line 310, in __init__
    l2_loss = tf.reduce_mean(tf.concat(axis=0, values=l2_losses), 0,
  File "/home/amir/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1034, in concat
    name=name)
  File "/home/amir/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 519, in _concat_v2
    name=name)
  File "/home/amir/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 546, in apply_op
    (input_name, op_type_name, len(values), num_attr.minimum))
ValueError: List argument '
values' to 'ConcatV2' Op with length 0 shorter than minimum length 2.





Chris Waterson

unread,
May 8, 2017, 8:34:15 AM5/8/17
to Amir Bakarov, Swivel Embeddings
Hi Amir. Could you please sync to head and let me know if the problem persists? Thanks...

--
You received this message because you are subscribed to the Google Groups "Swivel Embeddings" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swivel-embeddings+unsubscribe@googlegroups.com.
To post to this group, send email to swivel-embeddings@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/swivel-embeddings/7b35ca9a-a98d-4b54-9f77-0f4c643ef2de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Amir Bakarov

unread,
May 8, 2017, 12:13:12 PM5/8/17
to Swivel Embeddings
Hi Chris, syncing helped, now it works! Thanks! :)
Reply all
Reply to author
Forward
0 new messages