代码笔记
Amber_0419
多做,多思,重表达。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【代码笔记】保存tensor至本地文件
首先,创建用于写入的文件(这里举例Ubuntu系统)touch graphq.np保存tensor gpath_temp = '/root/KING/graph_features' # 文件存储目录 file_name = os.path.join(gpath_temp, 'graphq.np') # 写入graphq.np文件 g = recon_s2.cuda().data.cpu().numpy() np.savetxt(file_name, g)原创 2022-05-18 20:44:23 · 2016 阅读 · 0 评论 -
【实验日志】MISA-Cnet
z2 为要寻找的目标tensor实例化LinearModel类返回实例化发生在train.py里搬运要写在misa.py里recon_s2 :源域图向量;recon_t2 :目标域图像量X_s, X_s_, Y_s, X_t1, X_t1_X_s1, X_s2, Y_s, X_t1, X_t2原创 2022-04-08 11:22:03 · 1079 阅读 · 0 评论 -
【代码笔记】持续更新:知识图谱——gensim.corpora
第一次用到知识图谱,之前都是浅尝辄止,今天就从代码出发好好学习一下叭~到达train阶段时,图特征已提取完毕,并形成.np文件。现阶段以这些.np文件为基础构建跨域的知识库。获取路径 source_path = get_dataset_path(source_name, 'small') target_path1 = get_dataset_path(target_name, 'small') target_path2 = get_dataset_path(targ.原创 2022-04-04 18:19:26 · 1406 阅读 · 0 评论
分享