Comments (10)
@GaoJianchao 在build.sh 加一行 -I./ \ 试一下 , 我重新提交了一下,可以重新拉取试一下
from cplus-kcws.
please input query:我们是**人
2019-07-03 09:25:28.294904: E tensorflow/core/common_runtime/executor.cc:645] Executor failed to create kernel. Invalid argument: NodeDef mentions attr 'batch_dims' not in Op<name=GatherV2; signature=params:Tparams, indices:Tindices, axis:Taxis -> output:Tparams; attr=Tparams:type; attr=Tindices:type,allowed=[DT_INT32, DT_INT64]; attr=Taxis:type,allowed=[DT_INT32, DT_INT64]>; NodeDef: embedding_lookup_1 = GatherV2[Taxis=DT_INT32, Tindices=DT_INT32, Tparams=DT_FLOAT, _class=["loc:@words"], _output_shapes=[[?,80,50]], batch_dims=0, _device="/job:localhost/replica:0/task:0/device:CPU:0"](words, _arg_input_placeholder_0_0, embedding_lookup_1/axis). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
[[Node: embedding_lookup_1 = GatherV2[Taxis=DT_INT32, Tindices=DT_INT32, Tparams=DT_FLOAT, _class=["loc:@words"], _output_shapes=[[?,80,50]], batch_dims=0, _device="/job:localhost/replica:0/task:0/device:CPU:0"](words, _arg_input_placeholder_0_0, embedding_lookup_1/axis)]]
E0703 09:25:28.295219 46256 tfmodel.cc:88] Error during inference: Invalid argument: NodeDef mentions attr 'batch_dims' not in Op<name=GatherV2; signature=params:Tparams, indices:Tindices, axis:Taxis -> output:Tparams; attr=Tparams:type; attr=Tindices:type,allowed=[DT_INT32, DT_INT64]; attr=Taxis:type,allowed=[DT_INT32, DT_INT64]>; NodeDef: embedding_lookup_1 = GatherV2[Taxis=DT_INT32, Tindices=DT_INT32, Tparams=DT_FLOAT, _class=["loc:@words"], _output_shapes=[[?,80,50]], batch_dims=0, _device="/job:localhost/replica:0/task:0/device:CPU:0"](words, _arg_input_placeholder_0_0, embedding_lookup_1/axis). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
[[Node: embedding_lookup_1 = GatherV2[Taxis=DT_INT32, Tindices=DT_INT32, Tparams=DT_FLOAT, _class=["loc:@words"], _output_shapes=[[?,80,50]], batch_dims=0, _device="/job:localhost/replica:0/task:0/device:CPU:0"](words, _arg_input_placeholder_0_0, embedding_lookup_1/axis)]]
2019-07-03 09:25:28.295281: E ./kcws/cc/tf_seg_model.cc:320] Error during inference:
谢谢你的回答,但我在执行预测的时候输入句子后报错,是因为我训练和测试时候用的tensorflow版本不一样的原因吗?训练用的1.14,测试用的1.6
from cplus-kcws.
@GaoJianchao 项目自带的模型能跑吗,你这个我就不是很清楚了,需要你自己查一下
from cplus-kcws.
项目自带的可以跑
from cplus-kcws.
@GaoJianchao 我看你的好像是输入参数 好像有点问题,你可以查一下看看,参考src/kcws/tf_seg_model.cc
的TfSegModel::LoadModel函数,修改一下inputTensors 参数 。
from cplus-kcws.
但是我没有改动代码啊,为什么输入参数有问题?
from cplus-kcws.
我觉得是因为训练时候tensorflow用的版本太高了
from cplus-kcws.
你的模型就是用用原文(https://github.com/koth/kcws.git)的训练的吗? 那你查一下,学习下。 @GaoJianchao
from cplus-kcws.
我本地的版本也是1.6以上的但是解码是可以的啊
from cplus-kcws.
我是用的原文训练的一点代码也没改,训练用的tensorflow-gpu-1.14.0,测试用的你的代码编译的不过编译的tensorflow是没有gpu的1.6版本
from cplus-kcws.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cplus-kcws.