ConnollyLeon
ConnollyLeon
@danyang-liu Thanks for your replying, I am now trying to use wikidata-graph.tsv to find all relations connected to a specified node. With all the relations I found, I think I...
change 'save_model' in yaml file to True. And add a parameter ' MODEL_DIR' to use prepare_hparams function, like **MODEL_DIR=os.path.join(data_path,** 'save_models'),** you can find an example in 07_tutorials/KDD2020-tutorial/step4_run_dkn_item2item.ipynb
> 搜索结果里面有乱码,怎么处理呀 这个问题应该是因为PKUBASE的数据库有脏数据。有乱码的话,建议把这个去掉
> > 修改kb.py代码,使其能通过http api直接访问PKUBASE的数据库。还省去了搭建本地neo4j的步骤。在我自己的机器上,效率从300秒处理完一个数据变成了3秒一个数据。 > > 可能存在的问题:因为将Cypher语句转化成了 sparql语句,可能存在查询不全的问题(原代码中cypher语句基本上是无向查询,而sparql本身就是有向的查询)。如果后期发现有问题再进行修改。 > > 6月9号更新 try要在json.loads之后,不然会报错。现在只有在断网的时候才会报错。 kb_http主要在entity_extractor和tuple_extractor里面使用,这里附上我的修改后的版本。 **仅供参考,因为还没有完全调试好,结构写的也不够清晰!!** 在修改里参考了原作者的思路,加上了几个本地缓存来避免断网之后要重新查找的问题,毕竟对整个数据集完整查询一次还挺慢的。这样查询完之后再训练,如果以后报错了可以省几个小时。 > > [kb_http.zip](https://github.com/duterscmy/ccks2019-ckbqa-4th-codes/files/4749545/kb_http.zip) > > 你好,连接数据库时报错:{'StatusCode': 903, 'StatusMsg': 'username not find.'} 具体的账号和密码怎么获取呢? 2年前的东西突然被翻出来了0.0,我已经不维护这个代码啦,可能数据库不让访问了,我记得我当时是不需要账号和密码的...
@Chillee Thanks for you reply. But why did the `weight` parameters of Linear layers turns out to become `tensor_constant` in the FxModule? Could you please help explain this?