上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 56 下一页

2019年9月26日

摘要: AdaGrad (Adaptive Gradient,自适应梯度) 对每个不同的参数调整不同的学习率, 对频繁变化的参数以更小的步长进行更新,而稀疏的参数以更大的步长进行更新。 gt表示第t时间步的梯度(向量,包含各个参数对应的偏导数,gt,i表示第i个参数t时刻偏导数) gt2表示第t时间步的梯度 阅读全文
posted @ 2019-09-26 11:54 happygril3 阅读(565) 评论(0) 推荐(0)

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)

2019年9月24日

摘要: (一)清除图 g.clear() (二)节点和边得数量 (二)类型和维度 (三)删除节点和边特征 (四)增加节点 (五)增加边 1.g.add_edge(i,j) 2.g.add_edges(src_list,dst_list) 3.g.add_edges(src_tensors,dst_tenso 阅读全文
posted @ 2019-09-24 17:40 happygril3 阅读(978) 评论(0) 推荐(0)

2019年9月18日

摘要: //object apply_test {// def main(args:Array[String]): Unit ={// println("apply 方法:"+apply("zara","gmail.com"))// println("unapplu方法"+unapply("zara@gma 阅读全文
posted @ 2019-09-18 18:45 happygril3 阅读(178) 评论(0) 推荐(0)
摘要: import java.io.FileReaderimport java.io.FileNotFoundExceptionimport java.io.IOExceptionobject exception_test { def main(args:Array[String]): Unit ={ t 阅读全文
posted @ 2019-09-18 18:27 happygril3 阅读(136) 评论(0) 推荐(0)
摘要: //it.next()返回迭代器的下一个元素//it.hasNext()检测集合中是否还有元素object iterator_test { def main(args:Array[String]): Unit ={// val it=Iterator("baidu","google","taobao 阅读全文
posted @ 2019-09-18 18:08 happygril3 阅读(191) 评论(0) 推荐(0)
摘要: //list:可以存放重复的对象,相同类型//set:没有重复的对象//map:键值对的映射//元组:不同类型的值的集合//option:容器//iterator:迭代器,逐一访问容器内的元素//与python的区别://1."one":1 "one"->1//2.print("x",x) prin 阅读全文
posted @ 2019-09-18 18:07 happygril3 阅读(161) 评论(0) 推荐(0)
摘要: scala中集合主要分为两类,可变(mutable)和不可变(immutable) package chapter03 //java 中的集合List,Set,Map //List:有序,可重复 ArrayList,LinkedList //Set:无序,不可重复 Mapset,TreeSet // 阅读全文
posted @ 2019-09-18 18:06 happygril3 阅读(144) 评论(0) 推荐(0)
上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 56 下一页

导航