pytorch-cifar icon indicating copy to clipboard operation
pytorch-cifar copied to clipboard

Resnet Shortcut Condition

Open BlueAnthony opened this issue 4 years ago • 1 comments

想请问一下这行 if stride != 1 or in_planes != self.expansion*planes: 这两个条件看起来不可能单独存在 两个条件一定会同时符合,所以判断其中一个似乎就够了? 也就是说,不会有下列几种可能:

  1. stride != 1 但 in_planes == self.expansion*planes
  2. stride == 1 但 in_planes != self.expansion*planes 还是我哪里理解错了?

BlueAnthony avatar Jun 19 '20 20:06 BlueAnthony

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.

timothylimyl avatar Nov 03 '20 11:11 timothylimyl