Fork me on GitHub
摘要: #设置随机数种子 np.random.seed(args.seed) torch.manual_seed(args.seed)#cpu版本 if args.cuda: torch.cuda.manual_seed(args.seed) 阅读全文
posted @ 2022-09-15 11:07 天淇 阅读(23) 评论(0) 推荐(0)
摘要: #标签读取后由one-hot编码转化为数值 labels=torch.from_numpy(data['label'].todense()) labels=labels.nonzero()[:,1] #GCN导入字符串列表labels转化为one-hot编码 classes=set(labels) 阅读全文
posted @ 2022-09-15 10:44 天淇 阅读(49) 评论(0) 推荐(0)
摘要: CSR Matrix存储结构 csr_matrix()函数和csc_matrix() coo_matrix 按照行列对应数值初始化 可以通过tobsr()、tocsr()、to_csc()、to_dia()、to_dok()、to_lil()能与CSR / CSC格式的快速转换 阅读全文
posted @ 2022-09-15 10:28 天淇 阅读(155) 评论(0) 推荐(0)
Live2D