【发布时间】:2020-09-06 15:56:56
【问题描述】:
我正在尝试在我创建的一些小型网络上运行graph2vec。它可以通过特征提取阶段,但是当它开始优化时会引发错误:
Traceback (most recent call last):
File "src/graph2vec.py", line 129, in <module> main(args)
File "src/graph2vec.py", line 125, in main save_embedding(args.output_path, model, graphs, args.dimensions)
File "src/graph2vec.py", line 98, in save_embedding out.append([int(identifier)] + list(model.docvecs["g_"+identifier]))
ValueError: invalid literal for int() with base 10: 'dataset\\0'
Research 告诉我,当预期为整数但提供了其他数据类型时会发生此错误。看起来它可能试图传递 dataset\0 作为标识符,而它应该只传递 0?
我设置了文档中指定的目录结构:
graph2vec
dataset
[contains many json data files]
features
src
graph2vec.py
param_parser.py
我正在从顶部 graph2vec 目录运行 python src/graph2vec.py。知道出了什么问题吗?
【问题讨论】:
标签: python pandas numpy networkx