解决tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0,32] = -1 is not in [0, 50)
Posted 沉迷单车的追风少年
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0,32] = -1 is not in [0, 50)相关的知识,希望对你有一定的参考价值。
今晚遇到了一个很神奇的问题,在tensorflow embedding过程中:
File "/root/Handwriting/Diffusion-Handwriting-Generation-master/nn.py", line 215, in call
output = self.embedding(lstm_output)
File "/root/anaconda3/envs/tf35/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 985, in __call__
outputs = call_fn(inputs, *args, **kwargs)
File "/root/anaconda3/envs/tf35/lib/python3.7/site-packages/tensorflow/python/keras/layers/embeddings.py", line 189, in call
out = embedding_ops.embedding_lookup_v2(self.embeddings, inputs)
File "/root/anaconda3/envs/tf35/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper
return target(*args, **kwargs)
File "/root/anaconda3/envs/tf35/lib/python3.7/site-packages/tensorflow/python/ops/embedding_ops.py", line 394, in embedding_lookup_v2
return embedding_lookup(params, ids, "div", name, max_norm=max
以上是关于解决tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0,32] = -1 is not in [0, 50)的主要内容,如果未能解决你的问题,请参考以下文章