2019年9月25日

摘要: import torch as th import dgl g=dgl.DGLGraph() g.add_nodes(3) g.ndata["x"]=th.ones(3,4) #number of features to match number of nodes print("nodes",g.nodes()) print("ndata",g.ndata["x"]) #increment... 阅读全文
posted @ 2019-09-25 19:32 happygril3 阅读(302) 评论(0) 推荐(0)
摘要: '''class torch.nn.Linear(in_features,out_features,bias = True )[来源] 参数: in_features - 每个输入样本的大小out_features - 每个输出样本的大小bias - 如果设置为False,则图层不会学习附加偏差。默认值:True''' import torch x = torch.randn(3,... 阅读全文
posted @ 2019-09-25 19:27 happygril3 阅读(218) 评论(0) 推荐(0)
摘要: '''Send messages through all edges >>> update all nodes.DGLGraph.update_all(message_func='default', reduce_func='default', apply_node_func='default')message_func --message function on the edgesreduce_... 阅读全文
posted @ 2019-09-25 17:41 happygril3 阅读(484) 评论(0) 推荐(0)

导航