kcws icon indicating copy to clipboard operation
kcws copied to clipboard

最后一步 web

Open kinghuangdd opened this issue 8 years ago • 3 comments

执行:./bazel-bin/kcws/cc/seg_backend_api --model_path=kcws/models/seg_model.pbtxt --vocab_path=kcws/models/basic_vocab.txt --max_sentence_len=80 --user_dict_path=kcws/models/word_vocab.txt 报错: 2017-09-27 17:31:47.889749: 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. 2017-09-27 17:31:47.889814: 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. WARNING: Logging before InitGoogleLogging() is written to STDERR I0927 17:31:47.893932 19816 tfmodel.cc:64] Reading file to proto: kcws/models/seg_model.pbtxt I0927 17:31:47.915163 19816 tfmodel.cc:69] Creating session. I0927 17:31:47.956421 19816 tfmodel.cc:72] Could not create Tensorflow Graph: Invalid argument: No OpKernel was registered to support Op 'FloorMod' with these attrs. Registered devices: [CPU], Registered kernels: [[Node: idcnn_1/atrous-conv-layer-2/atrous_conv2d/mod_2 = FloorMod[T=DT_INT32, _output_shapes=[[]]](idcnn_1/atrous-conv-layer-2/atrous_conv2d/add_3, idcnn_1/atrous-conv-layer-2/atrous_conv2d/mod_2/y)]] 2017-09-27 17:31:47.956861: I kcws/cc/tf_seg_model.cc:227] Could not load model from: kcws/models/seg_model.pbtxt F0927 17:31:47.956912 19816 seg_backend_api.cc:49] Check failed: model.LoadModel(FLAGS_model_path, FLAGS_vocab_path, FLAGS_max_sentence_len, FLAGS_user_dict_path) Load model error *** Check failure stack trace: *** 已放弃 (核心已转储)

kinghuangdd avatar Sep 27 '17 09:09 kinghuangdd

看起来像是你用一个不同版本的tf训练并导出了模型。。

koth avatar Sep 27 '17 12:09 koth

额,确实是,之前是用tf1.0python3.6 后来到某步跑不过去了又用的python2.7 tf0.8 还是不行有把tf0.8升级到了tf1.3 ........so?是不是版本的问题?要不要用一个的版本统一跑一遍?

kinghuangdd avatar Sep 28 '17 01:09 kinghuangdd

这个问题后来怎么解决的?

mjc14 avatar Jan 08 '19 01:01 mjc14