Comments (7)
你是不是没更新代码呢?
from kcws.
是的,我错了,没有更新代码 -!- 那看来我是自己在本地更新了一下您的代码!哈哈
from kcws.
用python3.6跑报错:
Traceback (most recent call last):
File "kcws/train/train_pos.py", line 348, in
tf.app.run()
File "/home/kinghuang/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "kcws/train/train_pos.py", line 311, in main
FLAGS.char_word2vec_path, FLAGS.num_hidden)
File "kcws/train/train_pos.py", line 80, in init
self.w2v = self.load_w2v(w2vPath, FLAGS.embedding_word_size)
File "kcws/train/train_pos.py", line 205, in load_w2v
line = fp.readline().strip()
File "/home/kinghuang/anaconda3/envs/tensorflow/lib/python3.6/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 4282-4283: invalid continuation byte
用python2.7跑报错:
Traceback (most recent call last):
File "kcws/train/train_pos.py", line 347, in
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run
sys.exit(main(sys.argv))
File "kcws/train/train_pos.py", line 312, in main
wX, cX, Y = inputs(trainDataPath)
File "kcws/train/train_pos.py", line 290, in inputs
features = tf.transpose(tf.stack(whole[0:FLAGS.max_sentence_len]))
AttributeError: 'module' object has no attribute 'stack'
麻烦问下是不是代码未更新的问题?
from kcws.
@kinghuangdd 需要升级下你的TF到1.1+
from kcws.
好啦,谢谢大神!
from kcws.
@oneapmlj 你上面说的第二点是正确的吗? 在第6步中”pos_vocab.txt“换位“lines_withpos.txt”
from kcws.
@oneapmlj 你上面说的第二点是正确的吗? 在第6步中”pos_vocab.txt“换位“lines_withpos.txt”
是之前没有更新代码的原因!
from kcws.
Related Issues (20)
- 分词效率低的问题 HOT 6
- 大神解释下basic_string_util.h 头文件中u8tou16 和u16tou8 这两个函数的意义 HOT 1
- kcws除了分词之外,有关键词提取、文本摘要、文件聚类等功能吗 HOT 1
- python版本问题
- 添加语料训练,准确率只有37%左右
- 能不能提供一个通用Python训练代码啊 HOT 4
- 大神,好,训练模型后如何使用模型呢? HOT 9
- 关于模型导出--output_node_names "transitions,Reshape_9" "transitions,Reshape_7" 什么意思 HOT 3
- 最后一部web报错:Invalid argument: Session was not created with a graph before Run()! HOT 1
- 运行最后一步,报错Executor failed to create kernel. Invalid argument: NodeDef mentions attr 'dilations' HOT 2
- std::ifstream in("/home/work/test/nlu-ner/train_and_dict/model/origin_corpus/origin_corpus"); HOT 3
- error C++ compilation of rule '@protobuf//:protobuf' failed (Exit 2). cl: 命令行 error D8021 :无效的数值参数“/Wwrite-strings” HOT 2
- 用IDCNN做NER模型推断结果不稳定,多次运行同一语句,得到不同的输出结果
- Bazel 编译错误,使用0.70版本
- 语料准备相关问题
- 如何使用最新版本tensorflow? HOT 1
- 词性标注模型下载 (临时方案,后续文档给出词性标注模型训练,导出等)
- 关于demo接口问题
- 你好,楼主,请问一下如果自己编写py文件,除了添加build文件内容,还需要配置其他信息吗,我这边自己编写的py文件编译后运行一直报w2v包不存在的错误
- 编译后台服务报错 HOT 3
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 kcws.