pytorch-cifar
pytorch-cifar copied to clipboard
Resnet Shortcut Condition
想请问一下这行 if stride != 1 or in_planes != self.expansion*planes: 这两个条件看起来不可能单独存在 两个条件一定会同时符合,所以判断其中一个似乎就够了? 也就是说,不会有下列几种可能:
- stride != 1 但 in_planes == self.expansion*planes
- stride == 1 但 in_planes != self.expansion*planes 还是我哪里理解错了?
You are right, if you just leave it as if stride !=1:
, you will get the same results as ResNet only uses a stride of 2 when wanting to change the number of filter kernels.