indiejoseph / cnn-text-classification-tf-chinese Goto Github PK
View Code? Open in Web Editor NEWCNN for Chinese Text Classification in Tensorflow
CNN for Chinese Text Classification in Tensorflow
The training accuracy is fluctuating between 55% -75% even after 800 steps.
I wonder in your case, how many steps did you take to make it converge to 98%?
您好,我看你写的是中文的文本分类,所以就用中文问了
这个demo好像做的是句子级别的分类,但是我想请问下,如果我有多个句子应该怎么办呢?
把channel数改成相应的句子数吗?相应的batch应该选择哪个呢?
希望您有空能回复下,感激不尽
提示内存不够,但是内存很明显够呀剩下100g呢
I tensorflow/core/common_runtime/bfc_allocator.cc:692] 1 Chunks of size 6652672 totalling 6.34MiB
I tensorflow/core/common_runtime/bfc_allocator.cc:696] Sum Total of in-use chunks: 42.12MiB
I tensorflow/core/common_runtime/bfc_allocator.cc:698] Stats:
Limit: 91684864
InUse: 44171776
MaxInUse: 48052736
NumAllocs: 138
MaxAllocSize: 6652672
W tensorflow/core/common_runtime/bfc_allocator.cc:270] ******************xx**************************____******____________________________________________
W tensorflow/core/common_runtime/bfc_allocator.cc:271] Ran out of memory trying to allocate 44.94MiB. See logs for memory state.
Traceback (most recent call last):
Name: tensorflow
Version: 0.11.0rc1
Location: /usr/local/lib/python2.7/dist-packages
Requires: mock, protobuf, numpy, wheel, six
谢谢
你好,我参考train.py的参数和cnn-text-classification-tf的train.py,eval.py 尝试写了一个eval.py,但是测试的Accuracy只有0.503125。
刚接触tensorflow,而且在测试集不同时,最大sequence_length不同,模型shape对不上,想改成placeholder失败,后来用整个训练集作为测试,得出的准确率50.3%和训练最后的98%左右差异很大。
可以提供一份对应的eval.py么?
I managed to run the code in TF 1.0.1 using the conversion script. However, I still cannot found the _linear function in TF 1.0.1 in text_cnn.py line 14. Could you give some suggestions? Thanks.
this is totaly mis-report!
sorry!
你好,
我最近在做中文文本多分类,tensorflow刚开始学,还不太懂,如果我没搞错这个是做二分类的,请问要做多分类的话怎么修改呢?谢谢!
刚入门,在Linux系统上安装驱动太麻烦,就在Windows上搞了,可是TensorFlow对Windows系统只支持python3.5版本的。。
如题,如尝试过,不知效果如何?是否会提高准召率?谢谢。
如题,谢谢!
你好啊, 我这边直接 ./train.py
就报错了
会不会是版本不对? 0.9.0 >> 1.0.1
我的 tensorflow 版本为 1.0.1
python 为 2.7.13
Traceback (most recent call last): File "./train.py", line 76, in <module> l2_reg_lambda=FLAGS.l2_reg_lambda) File "/Users/edwardchan/projects/classification/cnn-text-classification-tf-chinese/text_cnn.py", line 75, in __init__ self.h_pool = tf.concat(3, pooled_outputs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1029, in concat dtype=dtypes.int32).get_shape( File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 637, in convert_to_tensor as_ref=False) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 702, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 110, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 99, in constant tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape)) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 367, in make_tensor_proto _AssertCompatible(values, dtype) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible (dtype.name, repr(mismatch), type(mismatch).__name__)) TypeError: Expected int32, got list containing Tensors of type '_Message' instead.
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.