2020.6.9
- Pytorch中的Parameter()
参考博客:
PyTorch里面的torch.nn.Parameter()
Pytorch模型中的parameter与buffer
GCN源码:
class GraphConvolution(Module):
"""
Simple GCN layer, similar to https://arxiv.org/abs/1609.02907
"""
def __init__(self, in_features, out_features, bias=True):
...
self.weight = Parameter(torch.FloatTensor(in_features, out_features))
if bias:
self.bias = Parameter(torch.FloatTensor(out_features))
else:
self.register_parameter('bias', None)
...
- Python repr()方法
参考链接:
Python repr()方法:显示属性 - np.genfromtxt函数
参考链接:
Numpy.genfromtxt - torch.sparse
参考链接:
Pytorch中的sparse矩阵处理