shiyybua / ner Goto Github PK
View Code? Open in Web Editor NEW基于tensorflow深度学习的中文的命名实体识别
基于tensorflow深度学习的中文的命名实体识别
请教下在同一套代码训练和预测的,为什么训练后去预测会保证错呢
WARNING:tensorflow:From D:\workspace\python_project\NER\package\utils.py:210: TextLineDataset.init (from tensorflow.contrib.data.python.ops.readers) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.data.TextLineDataset
.
Traceback (most recent call last):
File "D:\Python35\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 686, in _call_cpp_shape_fn_impl
input_tensors_as_shapes, status)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 473, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices.shape[-1] must be <= params.rank, but saw indices shape: [?,11] and params shape: [1,16] for 'ner/cond/GatherNd' (op: 'GatherNd') with input shapes: [1,16], [?,11].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/workspace/python_project/NER/package/rnn.py", line 168, in
net = NER_net("ner", iterator, embedding, BATCH_SIZE)
File "D:/workspace/python_project/NER/package/rnn.py", line 28, in init
self._build_net()
File "D:/workspace/python_project/NER/package/rnn.py", line 68, in _build_net
self.outputs, self.y, self.seq_length)
File "D:\Python35\lib\site-packages\tensorflow\contrib\crf\python\ops\crf.py", line 201, in crf_log_likelihood
transition_params)
File "D:\Python35\lib\site-packages\tensorflow\contrib\crf\python\ops\crf.py", line 128, in crf_sequence_score
fn2=_multi_seq_fn)
File "D:\Python35\lib\site-packages\tensorflow\python\layers\utils.py", line 211, in smart_cond
return control_flow_ops.cond(pred, true_fn=fn1, false_fn=fn2, name=name)
File "D:\Python35\lib\site-packages\tensorflow\python\util\deprecation.py", line 316, in new_func
return func(*args, **kwargs)
File "D:\Python35\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 1894, in cond
orig_res_t, res_t = context_t.BuildCondBranch(true_fn)
File "D:\Python35\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 1752, in BuildCondBranch
original_result = fn()
File "D:\Python35\lib\site-packages\tensorflow\contrib\crf\python\ops\crf.py", line 114, in _single_seq_fn
array_ops.concat([example_inds, tag_indices], axis=1))
File "D:\Python35\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 2567, in gather_nd
"GatherNd", params=params, indices=indices, name=name)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 3162, in create_op
compute_device=compute_device)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 3208, in _create_op_helper
set_shapes_for_outputs(op)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 2427, in set_shapes_for_outputs
return _set_shapes_for_outputs(op)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 2400, in _set_shapes_for_outputs
shapes = shape_func(op)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 2330, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 627, in call_cpp_shape_fn
require_shape_fn)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 691, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: indices.shape[-1] must be <= params.rank, but saw indices shape: [?,11] and params shape: [1,16] for 'ner/cond/GatherNd' (op: 'GatherNd') with input shapes: [1,16], [?,11].
错误信息:HashTable has different value for same key. Key 提交的維基人及時間: has 249 and trying to add value 5693
请问下,在训练的时候报这个错误,如何解决?
target.txt是i手工标注的么?有没有比较方便的工具啊?谢谢
模型跑通了,但GPU使用率不超过20%,请问可能是什么问题导致的?
File "D:\App\novel\NER\rnn.py", line 166, in
net = NER_net("ner", iterator, embedding, BATCH_SIZE)
File "D:\App\novel\NER\rnn.py", line 26, in init
self._build_net()
File "D:\App\novel\NER\rnn.py", line 66, in _build_net
self.outputs, self.y, self.seq_length)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\crf\python\ops\crf.py", line 182, in crf_log_likelihood
transition_params)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\crf\python\ops\crf.py", line 109, in crf_sequence_score
false_fn=_multi_seq_fn)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\layers\utils.py", line 206, in smart_cond
pred, true_fn=true_fn, false_fn=false_fn, name=name)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\smart_cond.py", line 60, in smart_cond
name=name)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\util\deprecation.py", line 432, in new_func
return func(*args, **kwargs)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2047, in cond
orig_res_t, res_t = context_t.BuildCondBranch(true_fn)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 1897, in BuildCondBranch
original_result = fn()
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\crf\python\ops\crf.py", line 95, in _single_seq_fn
array_ops.concat([example_inds, tag_indices], axis=1))
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 3414, in gather_nd
"GatherNd", params=params, indices=indices, name=name)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 3292, in create_op
compute_device=compute_device)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 3332, in _create_op_helper
set_shapes_for_outputs(op)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 2496, in set_shapes_for_outputs
return _set_shapes_for_outputs(op)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 2469, in _set_shapes_for_outputs
shapes = shape_func(op)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py", line 2399, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 627, in call_cpp_shape_fn
require_shape_fn)
File "C:\Users\qiand\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 691, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: indices.shape[-1] must be <= params.rank, but saw indices shape: [?,11] and params shape: [1,16] for 'ner/cond/GatherNd' (op: 'GatherNd') with input shapes: [1,16], [?,11].
如题,谢谢!看来这个项目会火!
source_vocab.txt怎么来的
B-ORG B-LOC B-TIME I-TIME O B-ORG O B-ORG O B-ORG O B-ORG B-TIME
这些你是怎么标注下来的?是你自己标注的吗?还是本身就有的开源数据,我现在想构造与一个特定领域的命名实体程序,请问一下,可以怎么去利用你的这个程序,谢谢
Traceback (most recent call last):
File "E:/python-files/NER/rnn.py", line 153, in
embedding = load_word2vec_embedding(vocab_size)
File "E:\python-files\NER\utils.py", line 264, in load_word2vec_embedding
embeddings[index] = coefs # 将词和对应的向量存到字典里
IndexError: index 2 is out of bounds for axis 0 with size 2
请问一下作者,这个问题怎么解决啊,弄了半天,不知道怎么办?
Traceback (most recent call last):
File "rnn.py", line 153, in
embedding = load_word2vec_embedding(vocab_size)
File "/home/gmy/NER-master/utils.py", line 263, in load_word2vec_embedding
embeddings[index] = cofes # 将词和对应的向量存到字典里
ValueError: could not broadcast input array from shape (0) into shape (300)
不知道怎么回事。 谢谢
双向RNN里边需要传递batch里边每一条数据的确切长度,不然backward的结果完全就是错误的,费了好长时间才发现这个问题,麻烦请及时更正。
tf.nn.bidirectional_dynamic_rnn(cell_fw, cell_bw, seq, seq_length, initial_state_fw,initial_state_bw)
Traceback (most recent call last):
File "D:/rnn_lstm/rnn.py", line 153, in
embedding = load_word2vec_embedding(vocab_size)
File "D:\rnn_lstm\utils.py", line 285, in load_word2vec_embedding
initializer=tf.constant_initializer(embeddings), trainable=False)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 1203, in get_variable
constraint=constraint)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 1092, in get_variable
constraint=constraint)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 425, in get_variable
constraint=constraint)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 394, in _true_getter
use_resource=use_resource, constraint=constraint)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 805, in _get_single_variable
constraint=constraint)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\variables.py", line 213, in init
constraint=constraint)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\variables.py", line 303, in _init_from_args
initial_value(), name="initial_value", dtype=dtype)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 779, in
shape.as_list(), dtype=dtype, partition_info=partition_info)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\init_ops.py", line 200, in call
self.value, dtype=dtype, shape=shape, verify_shape=verify_shape)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 208, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 447, in make_tensor_proto
"Cannot create a tensor proto whose content is larger than 2GB.")
ValueError: Cannot create a tensor proto whose content is larger than 2GB.
为了replicate你的result,想看看步骤是否一致。
您好,请问下,当预测时,预测句子不满足一个batch,出现InvalidArgumentError问题,应怎么处理?
O
B-LOC
I-TIME
B-ORG
I-CRIME
B-PER
I-ORG
B-TIME
B-ROLE
B-CRIME
I-PER
I-LAW
I-LOC
I-ROLE
B-LAW
具体有这些类别,但具体表示的什么,大神可以做个备注吗?
您好,请问最终测试结果精度如何
word embeddings 是怎么训练的
请问这个文件的格式是什么?Thanks
请问在train时一直报这个错误
embeddings[index] = coefs # 将词和对应的向量存到字典里
ValueError: could not broadcast input array from shape (299) into shape (300)
这要怎么解决。
首先感谢兄dei提供的工程,我对RNN不太了解,我想知道这个工程 如何能运行起来,然后来研究流程
我的准备情况是这样,我在pydev建立的工程 语法py2.7,解释器是py3.6(已装好TensorFlow),这样不用去修改print 但是报错的地方依然是utils.py中的47行if type(word) is unicode: 我修改为 if isinstance(word,str)==True:
在resource文件夹中把兄dei网盘中的wiki.zh.vec放在里面,加上原先的3个txt 就是这4个文件
config.py 中 我先把action中的predict改成了 train 试着能否运行 结果是不能运行
所以兄dei能告诉我 正确的运行方法吗,真的很想知道
关于预训练的词向量也是我从网上下载的,可以参考下这个:
http://www.jianshu.com/p/05800a28c5e4
OutOfRangeError (see above for traceback): Read fewer bytes than requested
[[Node: index_to_string/table_init = InitializeTableFromTextFileV2[delimiter="\t", key_index=-1, value_index=-2, vocab_size=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](index_to_string, string_to_index/hash_table/table_init/asset_filepath)]]
如题,跑出来代码的能不能分享下预测结果
在网上找了100维的词向量,不知道是因为维数太低还是其他原因,测试时放进去的句子几乎都识别不出来,把训练用的句子放进去也是错误的,请问哪里应该调整?
Traceback (most recent call last):
File "/root/pycharm/NER-master/rnn.py", line 181, in
predict(net, tag_table, sess)
File "/root/pycharm/NER-master/rnn.py", line 142, in predict
write_result_to_file(file_iter, tags)
File "/root/pycharm/NER-master/utils.py", line 291, in write_result_to_file
assert len(words) == len(tags)
AssertionError
运行train时出现以下错误提示:何解?
absl.flags._exceptions.UnparsedFlagAccessError: Trying to access flag --src_file before flags were parsed.
我用的前几个issue里作者回复的预训练词向量,结果在训练程序开始之前就迅速爆掉了。可是按理说,这个向量文件的大小都才1.3G左右,会一瞬间撑爆8G内存吗?
使用你给我的wiki.zh.vec训练时,出现以下报错
building word index...
source vocabulary file has already existed, continue to next stage.
loading word embedding, it will take few minutes...
Traceback (most recent call last):
File "rnn.py", line 153, in
embedding = load_word2vec_embedding(vocab_size)
File "/root/NER/utils.py", line 264, in load_word2vec_embedding
embeddings[index] = coefs # 将词和对应的向量存到字典里
IndexError: index 391175 is out of bounds for axis 0 with size 391175
我在训练时程序运行正常,但是在预测的过程中出现以下错误
loading pre-trained model from resource/model/points-10000.....
['新华社', '北京', '9', '月', '11', '日电', '第二十二届', '国际', '检察官', '联合会', '年会', '暨', '会员', '代表大会', '11', '日', '上午', '在', '北京', '开幕', '。', '国家', '主席', '***', '发来', '贺信', ',', '对', '会议', '召开', '表示祝贺', '。']
[b'O', b'O', b'O', b'O', b'O', b'O', b'O', b'O', b'O', b'O', b'O', b'O', b'O', b'O', b'O', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'', b'']
32
33
Traceback (most recent call last):
File "E:/NER-master/rnn.py", line 180, in
predict(net, tag_table, sess)
File "E:/NER-master/rnn.py", line 140, in predict
write_result_to_file(file_iter, tags)
File "E:\NER-master\utils.py", line 297, in write_result_to_file
assert len(words) == len(tags)
AssertionError
发现预测的结果不是O就是unknown,而且也报了长度不一致的错误,请问这种情况应该怎样解决。
Traceback (most recent call last):
File "G:/NER-master/Rnn.py", line 152, in
embedding = load_word2vec_embedding(vocab_size)
File "G:\NER-master\utils.py", line 265, in load_word2vec_embedding
embeddings[index] = coefs # 将词和对应的向量存到字典里
IndexError: index 2 is out of bounds for axis 0 with size 2
求解答
RT。求大神指导 @ shiyybua
wiki.zh.vec文件不存在,怎么弄啊?
感谢码主,不过可以给config文件里面的各种文件和作用注释一下吗,新手看了根本一头雾水呀,看不懂源码也捋不清各个文件的作用和从头到尾的流程。希望楼主能改进一下,给你加星了。
rnn.py 的138~139行改为:
tags = sess.run(tag_table.lookup(tf.constant(viterbi_sequence, dtype=tf.int64)))
作者循环执行run,导致预测及其缓慢。。
不过还是感谢作者
您好!
请问能给我一份需要训练好的词向量吗? (非常感谢)
邮箱地址:[email protected]
如题,我的邮箱是[email protected],万分感谢
不知道什么意思.
building word index...
loading word embedding, it will take few minutes...
WARNING:tensorflow:From /root/NER/utils.py:210: init (from tensorflow.contrib.data.python.ops.readers) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.data.TextLineDataset
.
Traceback (most recent call last):
File "rnn.py", line 166, in
net = NER_net("ner", iterator, embedding, BATCH_SIZE)
File "rnn.py", line 26, in init
self._build_net()
File "rnn.py", line 66, in _build_net
self.outputs, self.y, self.seq_length)
File "/usr/lib/python2.7/site-packages/tensorflow/contrib/crf/python/ops/crf.py", line 201, in crf_log_likelihood
transition_params)
File "/usr/lib/python2.7/site-packages/tensorflow/contrib/crf/python/ops/crf.py", line 128, in crf_sequence_score
fn2=_multi_seq_fn)
File "/usr/lib/python2.7/site-packages/tensorflow/python/layers/utils.py", line 211, in smart_cond
return control_flow_ops.cond(pred, true_fn=fn1, false_fn=fn2, name=name)
File "/usr/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 316, in new_func
return func(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 1894, in cond
orig_res_t, res_t = context_t.BuildCondBranch(true_fn)
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 1752, in BuildCondBranch
original_result = fn()
File "/usr/lib/python2.7/site-packages/tensorflow/contrib/crf/python/ops/crf.py", line 114, in _single_seq_fn
array_ops.concat([example_inds, tag_indices], axis=1))
File "/usr/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 2000, in gather_nd
"GatherNd", params=params, indices=indices, name=name)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3162, in create_op
compute_device=compute_device)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3208, in _create_op_helper
set_shapes_for_outputs(op)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2427, in set_shapes_for_outputs
return _set_shapes_for_outputs(op)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2400, in _set_shapes_for_outputs
shapes = shape_func(op)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2330, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 627, in call_cpp_shape_fn
require_shape_fn)
File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 691, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: indices.shape[-1] must be <= params.rank, but saw indices shape: [?,11] and params shape: [1,16] for 'ner/cond/GatherNd' (op: 'GatherNd') with input shapes: [1,16], [?,11].
src_unknown_id = tgt_unknown_id = vocab_size 这两个size为什么一样呢,不应该一个是词的种类数 ,一个是目标的种类数么?
输入wiki.zh.vec作为与训练的词向量,我发现这个里面词向量的长度有300,301,这样在load_word2vec_embedding中就会进入到
except ValueError:
# 如果真的这个词出现在了训练数据里,这么做就会有潜在的bug。那coefs的值就是上一轮的值。
print values[0], values[1:]
那么在train或者predict的时候,就会提示一个key含有多个不一样的值这样的问题,导致训练不能进行
HashTable has different value for same key
请问这个该怎么解决呢?
RT。 求助
您好我用您给的source和target是可以训练的,但是有个问题是换成我自己的就不行了。我之前用crf进行sequence labling,写了个脚本把之前的语料处理了一下变成您的格式,语料和标注的格式跟您的完全一样,训练的时候也没有报错,就是没有反应。我开始以为是太多了,后来我取了几十k的测试,还是没反应,请问您碰到过吗
resource目录中缺少wiki.zh.vec文件
这个是自动生成的吗,为什么里面是空的
Traceback (most recent call last):
File "F:/PyCharm Community Edition 2018.1/Project/venv/rnn.py", line 153, in
embedding = load_word2vec_embedding(vocab_size)
File "F:\PyCharm Community Edition 2018.1\Project\venv\utils.py", line 268, in load_word2vec_embedding
embeddings[index] = coefs # 将词和对应的向量存到字典里
IndexError: index 2 is out of bounds for axis 0 with size 2
Traceback (most recent call last):
File "/Users/YorkChu/PycharmProjects/NER/rnn.py", line 165, in
net = NER_net("ner", iterator, embedding, BATCH_SIZE)
File "/Users/YorkChu/PycharmProjects/NER/rnn.py", line 26, in init
self._build_net()
File "/Users/YorkChu/PycharmProjects/NER/rnn.py", line 66, in _build_net
self.outputs, self.y, self.seq_length)
File "/Users/YorkChu/dev/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/contrib/crf/python/ops/crf.py", line 182, in crf_log_likelihood
transition_params)
File "/Users/YorkChu/dev/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/contrib/crf/python/ops/crf.py", line 109, in crf_sequence_score
false_fn=_multi_seq_fn)
File "/Users/YorkChu/dev/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/layers/utils.py", line 206, in smart_cond
pred, true_fn=true_fn, false_fn=false_fn, name=name)
File "/Users/YorkChu/dev/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/framework/smart_cond.py", line 59, in smart_cond
name=name)
File "/Users/YorkChu/dev/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 432, in new_func
return func(*args, **kwargs)
File "/Users/YorkChu/dev/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2063, in cond
orig_res_t, res_t = context_t.BuildCondBranch(true_fn)
File "/Users/YorkChu/dev/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/ops/control_flow_ops.py", line 1913, in BuildCondBranch
original_result = fn()
File "/Users/YorkChu/dev/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/contrib/crf/python/ops/crf.py", line 95, in _single_seq_fn
array_ops.concat([example_inds, tag_indices], axis=1))
File "/Users/YorkChu/dev/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 2975, in gather_nd
"GatherNd", params=params, indices=indices, name=name)
File "/Users/YorkChu/dev/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/Users/YorkChu/dev/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3392, in create_op
op_def=op_def)
File "/Users/YorkChu/dev/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1734, in init
control_input_ops)
File "/Users/YorkChu/dev/anaconda3/envs/py2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1570, in _create_c_op
raise ValueError(str(e))
ValueError: indices.shape[-1] must be <= params.rank, but saw indices shape: [?,11] and params shape: [1,16] for 'ner/cond/GatherNd' (op: 'GatherNd') with input shapes: [1,16], [?,11].
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.