{"id":16271044,"url":"https://github.com/seanlee97/nnclf","last_synced_at":"2025-10-29T14:47:24.576Z","repository":{"id":92904720,"uuid":"104830215","full_name":"SeanLee97/nnclf","owner":"SeanLee97","description":"神经网络分类器，PyTorch实现","archived":false,"fork":false,"pushed_at":"2018-11-15T10:40:29.000Z","size":6129,"stargazers_count":21,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-04T06:36:05.928Z","etag":null,"topics":["pytorch","short-text-classify","textcnn","word2vec"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SeanLee97.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-26T03:14:16.000Z","updated_at":"2023-09-18T02:43:24.000Z","dependencies_parsed_at":"2023-04-13T05:00:39.735Z","dependency_job_id":null,"html_url":"https://github.com/SeanLee97/nnclf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SeanLee97/nnclf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeanLee97%2Fnnclf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeanLee97%2Fnnclf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeanLee97%2Fnnclf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeanLee97%2Fnnclf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SeanLee97","download_url":"https://codeload.github.com/SeanLee97/nnclf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeanLee97%2Fnnclf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281641952,"owners_count":26536358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pytorch","short-text-classify","textcnn","word2vec"],"created_at":"2024-10-10T18:12:17.104Z","updated_at":"2025-10-29T14:47:24.537Z","avatar_url":"https://github.com/SeanLee97.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 注意\n该项目不再更新，请转到 [clfzoo](https://github.com/SeanLee97/clfzoo)\n\n![PyTorch](https://raw.githubusercontent.com/SeanLee97/pytorch/master/docs/source/_static/img/pytorch-logo-dark.png)\n\n# nnclf\n\n分本分类的方法有很多种，而且传统的机器学习方法就能有很好的效果，\n神经网络的话在小数据量下是体现不出效果的，而且神经网络训练周期长。\n分享这个项目就当作加深对卷积神经网络CNN以及递归神经网络RNN的理解吧。\n\n**那么本项目主要有哪些亮点呢？**\n\n    1. 支持batch_size，短文本一般长度不一，所以用PyTorch的话一般得要自己封装好输入向量\n    看PyTorch文档时是不是在LSTM，GRU...这些地方会看到pack_padded_sequence(), pad_packed_sequence()呢？\n    在这里就可以用到了\n    2. 支持word2vec训练后的词向量表代替Embedding的权值。是不是有很多地方都说使用预训练的词向量效果会好？那究竟怎么用呢？\n    在这里就可以用到了\n\n**以上两点我都做了封装，看代码应该可以能理解，[使用方法](https://github.com/SeanLee97/nnclf/blob/master/Usage.ipynb)**\n\n\n## 运行环境\n\n* **Centos7**   当然其他linux, mac都可以，只要支持PyTorch的系统都可以，不过不支持windows\n* **python3.6** \n* **PyTorch V0.2** 记得更新一下PyTorch，因为用到了lr_scheduler，新版才有\n\n## 知识储备\n\n* [Understanding Convolutional Neural Networks for NLP](http://www.wildml.com/2015/11/understanding-convolutional-neural-networks-for-nlp/)\n* [The Unreasonable Effectiveness of Recurrent Neural Networks](http://karpathy.github.io/2015/05/21/rnn-effectiveness/)\n* 虽然有现成解决方案，但强烈推荐看一下word2vec原理，CBOW，Skip-gram，Hierarchical Softmax，Negative Sampling！！！[关于word2vec原理的博客](http://blog.csdn.net/itplus/article/details/37969519)\n\n## 联系我\n* 邮件(xmlee97#gmail.com, 把#换成@)\n* weibo: [@捏明](http://weibo.com/littlelxm)\n\n## 项目链接\n[SVM, FastText, TextCNN, BiGRU, CNN-BiGRU在短文本分类上的对比](https://github.com/SeanLee97/short-text-classification#short-text-classification)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanlee97%2Fnnclf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseanlee97%2Fnnclf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanlee97%2Fnnclf/lists"}