from:http://deeplearning.lipingyang.org/tensorflow-examples-text/

TensorFlow examples (text-based)

This page provides links to text-based examples (including code and tutorial for most examples) using TensorFlow.

(Stay tuned, as I keep updating the post while I grow and plow in my deep learning garden:). Also, if you find a dead link, please email me –you can find my email address from the About page, which has a link to my academic website.)

This is a good post. It introduces how to train the model using your own dataset.

To create a useful model you should train it on a large dataset. Ideally, the dataset should be specific for your task. Summarizing news article may be different from summarizing legal documents or job descriptions.

Full example can be found in TensorFlow examples (DNN-based text classification with DBpedia data): https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/learn/text_classification.py (note, that code there will be updated with new APIs so it’s better to check out there).

Another text classification using CNN (CNN-based text classification with DBpedia data):

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/learn/text_classification_cnn.py

It contains sample code for feeding customized training data set from csv files. It used a simple logistic regression classifier to classify Emails.

Its code on GitHub: Convolutional Neural Network for Text Classification in Tensorflow (python 3)  by dennybritz  on Github (Python 2 version by atveit on Github, this one forked the python 3 version by dennybritz)

Note that python 3 version has more functionality (e.g., eval.py) and it is more up to date.

tf.device("/cpu:0") forces an operation to be executed on the CPU. By default TensorFlow will try to put the operation on the GPU if one is available, but the embedding implementation doesn’t currently have GPU support and throws an error if placed on the GPU.

Johnson, R., & Zhang, T. (2014). Effective use of word order for text categorization with convolutional neural networks. arXiv preprint arXiv:1412.1058.

最新文章

  1. ios htttp网络请求cookie的读取与写入(NSHTTPCookieStorage)
  2. sql命令
  3. JS 学习(三)DOM
  4. vSphere6提示已弃用VMFS卷的解决方法
  5. Python语法基础
  6. 第一个sprint心得及感想
  7. c#中结构体(struct)和类(class)的区别
  8. Hashtable和Dictionary<T,K>的使用
  9. CakeDC(cakephp company)Git workflow--适合于较大团队大型项目开发
  10. ubuntu 安装AMP环境的笔记 Prefork方式与fast-cgi方法
  11. linux android ndk
  12. Number Sequence(kmp)
  13. fedora上安装ffmpeg
  14. (十)操作数据库、xlrd、xlwt补充
  15. Kali Linux之常见后门工具介绍
  16. Oracle数据库常用Sql语句大全
  17. C++学习(三)(C语言部分)之 基本数据类型
  18. eclipse oracle Database Manager plugin oracle数据库连接插件
  19. Excle中range的一些用法
  20. easyUI 展开DataGrid里面的行显示详细信息

热门文章

  1. 增加删除div
  2. Python3之Zip
  3. 在mac上快捷找到nodejs的安装路径
  4. 【PostgreSQL-9.6.3】临时表
  5. Git 分支创建
  6. TriAquae 是一款由国产的基于Python开发的开源批量部署管理工具
  7. (三)Python 学习第三天--GUI桌面项目
  8. resize监听div的size变化
  9. 数组题汇总(python3)
  10. 关于panda中dataframe的与&运算*(stackoverflow高票答案)