Du Ang

Results 57 comments of Du Ang

[Maximum Mean Discrepancy (distance distribution)](https://stats.stackexchange.com/questions/276497/maximum-mean-discrepancy-distance-distribution) 这个问题的回答里解释得挺好的。 按照我目前的理解,MMD 就是用来衡量 P 和 Q 两个数据分布之间的距离的。具体做法是将 P 和 Q (X 空间)通过函数 𝜑 分别映射到另一个空间 H(希尔伯特空间)中,然后计算 P 和 Q 在 H 空间 feature map 的均值差异。 Maximum...

[An empirical study on evaluation metrics of generative adversarial networks](https://arxiv.org/abs/1806.07755) 这篇论文提到可以用 kernel MMD 和 1-NN two-sample test 评价 GAN 的结果。

参考:https://distill.pub/2019/computing-receptive-fields/

Max pooling achieves partial invariance to small translations because the max of a region depends only on the single largest element. If a small translation doesn’t bring in a new...

[Making Convolutional Networks Shift-Invariant Again](https://arxiv.org/abs/1904.11486)

知乎的这个回答讲得挺好的:原码、反码、补码的产生、应用以及优缺点有哪些? - 脑洞插画铺的回答 - 知乎 https://www.zhihu.com/question/20159860/answer/71256667 1. 希望正数的编码和负数的编码加在一起刚好是0的编码 (CS107 Lecture 2) 2. 希望不浪费编码,+0和 -0

可以的,参考下面的例子: ```python class MyModel(nn.Module): def __init__(self, split_gpus): self.large_submodule1 = ... self.large_submodule2 = ... self.split_gpus = split_gpus if split_gpus: self.large_submodule1.cuda(0) self.large_submodule2.cuda(1) def forward(self, x): x = self.large_submodule1(x) if split_gpus: x =...

PyTorch 新版本给了官方教程:[Model Parallel Best Practices](https://pytorch.org/tutorials/intermediate/model_parallel_tutorial.html) 和 [Combine DDP with Model Parallelism](https://pytorch.org/tutorials/intermediate/ddp_tutorial.html#combine-ddp-with-model-parallelism)

参考:https://docs.python.org/zh-cn/3/reference/import.html

方法 1. 重新定义一个相同结构的网络,并赋予中间模块确定的名字,然后计算出对应层的输出并返回 例如: ```python class Vgg16(nn.Module): def __init__(self): super(Vgg16, self).__init__() self.conv1_1 = nn.Conv2d(3, 64, kernel_size=3, stride=1, padding=1) self.conv1_2 = nn.Conv2d(64, 64, kernel_size=3, stride=1, padding=1) self.conv2_1 = nn.Conv2d(64, 128, kernel_size=3,...