- 博客(8)
- 资源 (2)
- 收藏
- 关注
原创 scipy.optimize.curve_fit 与 matplotlib.pyplot.hist 直方图和密度图
matplotlib.pyplot.hist( x, bins=10, range=None, normed=False, weights=None, cumulative=False, bottom=None, histtype=u'bar', align=u'mid', orientation=u'vertical', rwidth...
2019-03-25 19:23:00 841
原创 torch: Invalid index in scatter at c:\a\w\1\s\windows\pytorch\aten\src\th\gene 解决
文档了解:https://pytorch.org/docs/stable/tensors.html?highlight=scatter_#torch.Tensor.scatter_scatter_(dim, index, src) → TensorWrites all values from the tensor src into self at the indices specifi...
2019-03-23 10:34:36 4002 1
原创 《MolGAN: An implicit generative model for small molecular graphs》了解
MolGAN论文的代码
2019-03-23 09:27:57 2924 7
原创 Semi-Supervised 图卷积
简单的例子:https://towardsdatascience.com/how-to-do-deep-learning-on-graphs-with-graph-convolutional-networks-7d2250723780https://towardsdatascience.com/how-to-do-deep-learning-on-graphs-with-graph-conv...
2019-03-18 13:58:10 2490 20
原创 pytorch的一个快速介绍
参考来源于:Pytorch Tutorial – Chongruo Wu写的真的不错,在这里分享下:首先是torch的三个主要模块:Tensor、 Variable 、Module。Tensor 可以视为ndarray , 但是可以在GPU上做计算,比如下图中的cuda设置; Variable 是计算图上的一个节点,存储数据和梯度;Module含有神经网络的层,可用于存储可训练的网络参...
2019-03-14 16:43:14 249
原创 LeetCode:Recursion
1. diameterOfBinaryTreeclass TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = Noneclass Solution: def diameterOfBinaryTree(self, ...
2019-03-14 13:43:44 311
转载 defaultdict
defaultdict 接受不带参数的可调用函数:from collections import defaultdictwords = ['hello', 'world', 'nice', 'world']#使用lambda来定义简单的函数counter = defaultdict(lambda: 0) for kw in words: counter[kw] += 1def...
2019-03-07 17:45:02 215
转载 python对象都用一个字典来保存其命名空间 : __dict__
class C: def __init__(self): self.x = 1 self.y = 2 def regist(self, key, val): self.__dict__[key] = valc = C()print c.__dict__c.regist("z", 3)c.regist("func", lam...
2019-03-07 12:16:29 594
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人