Seaton

Results 6 comments of Seaton

> > In layers.py, add a line` b_ij = b_ij + u_vj1` before line 143 `b_max = torch.max(b_ij, dim = 2, keepdim = True)` > > Hi, > > Thank...

> > In layers.py, add a line` b_ij = b_ij + u_vj1` before line 143 `b_max = torch.max(b_ij, dim = 2, keepdim = True)` > > same problem > when...

> Graph level classification, how to add batchsize? If the graph classification algorithm uses the DGL framework, it can divided a graph into mini-batches to accelerate the training.However, in my...

> @huntingingit 请问您的问题有得到解决吗 我也遇到了同样的问题,如果解决了的话,能否告知一下方法 解决表象的方式是这样的,首先squash函数那里,s = (mag_sq / (1.0 + mag_sq)) * (s / mag + 1e-8) 添加个1e-8, 然后在动态路由方法里给b做一个归一化b_max = torch.max(b_ij, dim=2, keepdim=True) ; b_ij = b_ij / b_max.values (这部分是其他人提出来的,实际上应该是放大b的值)...

谢谢老师,我知道了。 测试了一下,发现append_list()函数在首次被调用之后,再次调用时,无论调用多少次,lst和lst_updated都指向了同样的地址。 ![image](https://user-images.githubusercontent.com/56856685/81890178-ea527080-95d7-11ea-805c-50507729a825.png) ![image](https://user-images.githubusercontent.com/56856685/81890185-efafbb00-95d7-11ea-925f-6a28741158e7.png) ![image](https://user-images.githubusercontent.com/56856685/81890192-f3dbd880-95d7-11ea-872c-cc24b410c3a4.png) 老师在设计函数时的建议,让我收获很多。我在采用老师的建议编写代码时,还遇到一个小问题:我在使用递归的思想设计“查找树的所有后代节点”这个函数(部分代码见下图)时,确实需要修改参数中的列表。而这样做必须每次都先创建一个空列表descendants=[ ],然后再传入函数中进行修改、获得所有后代节点。这样每次使用该函数时都需要先创建一个空列表。我觉得为了这样程序的安全性,这样设计的函数使用起来不那么直接,似乎有一点别扭。不知道有没有即直接又安全的方法设计这样的函数? ![image](https://user-images.githubusercontent.com/56856685/81891483-1cb19d00-95db-11ea-999d-a5d6e95d5ecd.png)

之前写的时候没有考虑到extend函数,现在明白了,谢谢老师!