PyTextGCN:TextGCN的另一种重新实现,这次是使用Cython和PyTorch-geometric

上传者: 42175516 | 上传时间: 2023-04-23 19:52:15 | 文件大小: 37.36MB | 文件类型: ZIP
PyTextGCN 对TextGCN的重新实现。 此实现使用Cython进行文本到图形的转换,因此速度相当快。 图形和GCN基于库。 要求 该项目的构建具有: 的Python 3.8.5 Cython 0.29.21 CUDA 10.2(GPU支持可选) scikit学习0.23.2 pytorch 1.7.0 火炬几何1.6.3 海湾合作委员会9.3.0 nltk 3.5 scipy 1.5.2 至少Text2Graph模块也应该与这些库的其他版本一起使用。 安装 cython编译可以从项目的根目录执行: cd textgcn/lib/clib && python setup.py build_ext --inplace 用法 要从称为X的字符串列表(每个字符串包含一个文档的文本)中计算出图形,请创建名为y的标签列表以及测试索引test_idx的列表,只需运行:

文件下载

资源详情

[{"title":"( 39 个子文件 37.36MB ) PyTextGCN:TextGCN的另一种重新实现,这次是使用Cython和PyTorch-geometric","children":[{"title":"PyTextGCN-master","children":[{"title":"textgcn","children":[{"title":"__init__.py <span style='color:#111;'> 105B </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"__init__.py <span style='color:#111;'> 158B </span>","children":null,"spread":false},{"title":"clib","children":[{"title":"setup.py <span style='color:#111;'> 512B </span>","children":null,"spread":false},{"title":"graphbuilder.pyx <span style='color:#111;'> 11.49KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 104B </span>","children":null,"spread":false}],"spread":true},{"title":"models.py <span style='color:#111;'> 4.00KB </span>","children":null,"spread":false},{"title":"batching.py <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false},{"title":"text2graph.py <span style='color:#111;'> 10.85KB </span>","children":null,"spread":false}],"spread":true},{"title":"test","children":[{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"test_text2graph.py <span style='color:#111;'> 1.48KB </span>","children":null,"spread":false},{"title":"test_pmi.py <span style='color:#111;'> 1.69KB </span>","children":null,"spread":false},{"title":"test_model.py <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false},{"title":"test_cfunc.py <span style='color:#111;'> 4.09KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"perlevel_amazon.py <span style='color:#111;'> 5.67KB </span>","children":null,"spread":false},{"title":"requirements.yml <span style='color:#111;'> 2.39KB </span>","children":null,"spread":false},{"title":"data","children":[{"title":"amazon","children":[{"title":"test.csv <span style='color:#111;'> 4.26MB </span>","children":null,"spread":false},{"title":"train.csv <span style='color:#111;'> 21.71MB </span>","children":null,"spread":false},{"title":"unlabeled.csv <span style='color:#111;'> 65.38MB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"MLP_label.py <span style='color:#111;'> 6.63KB </span>","children":null,"spread":false},{"title":"mlp_helper.py <span style='color:#111;'> 4.53KB </span>","children":null,"spread":false},{"title":"MLP_flat.py <span style='color:#111;'> 4.00KB </span>","children":null,"spread":false},{"title":"results.csv <span style='color:#111;'> 695B </span>","children":null,"spread":false},{"title":"perlevel_dbpedia.py <span style='color:#111;'> 7.57KB </span>","children":null,"spread":false},{"title":"flat_dbpedia.py <span style='color:#111;'> 4.70KB </span>","children":null,"spread":false},{"title":"perlabel_amazon.py <span style='color:#111;'> 4.96KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false},{"title":"MLP_level.py <span style='color:#111;'> 6.48KB </span>","children":null,"spread":false},{"title":"results_dbpedia.csv <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"benchmark_graph.py <span style='color:#111;'> 1.78KB </span>","children":null,"spread":false},{"title":"flat_amazon.py <span style='color:#111;'> 4.85KB </span>","children":null,"spread":false},{"title":"old","children":[{"title":"h_o_hierarchical.py <span style='color:#111;'> 5.37KB </span>","children":null,"spread":false},{"title":"h_o_train_dbpedia.py <span style='color:#111;'> 5.47KB </span>","children":null,"spread":false},{"title":"Flat_HypOpt_Cat2_03_Feb_21_10_36_11.csv <span style='color:#111;'> 2.91KB </span>","children":null,"spread":false},{"title":"Lvl_HypOpt_Cat1_02_Feb_21_16_14_38.csv <span style='color:#111;'> 2.89KB </span>","children":null,"spread":false},{"title":"Hierarchical_HypOpt_Cat2_04_Feb_21_09_29_36.csv <span style='color:#111;'> 2.89KB </span>","children":null,"spread":false},{"title":"HypOpt_Labels_Cat2_05_Feb_21_09_14_16.csv <span style='color:#111;'> 21.00KB </span>","children":null,"spread":false},{"title":"h_o_lables.py <span style='color:#111;'> 6.34KB </span>","children":null,"spread":false},{"title":"h_o_train.py <span style='color:#111;'> 5.25KB </span>","children":null,"spread":false}],"spread":false},{"title":"eval_perlabel.py <span style='color:#111;'> 2.35KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明