Modify the definition of residual block to enable projection shortcut in ResNet models using residual blocks, which is consistent with the official ResNet model. Residual block is used when ResNet size is smaller than 50. In particular, the first layer in a block group should use a projection shortcut (shortcut with convolution) for ImageNet, similar to the bottleneck block. Keeping the existing shortcut so that it does not affect Cifar10 models.
Modify the definition of residual block to enable projection shortcut in ResNet
models using residual blocks, which is consistent with the official ResNet
model. Residual block is used when ResNet size is smaller than 50. In
particular, the first layer in a block group should use a projection shortcut
(shortcut with convolution) for ImageNet, similar to the bottleneck block.
Keeping the existing shortcut so that it does not affect Cifar10 models.

PiperOrigin-RevId: 211007645

annarev/benchmarks,tensorflow/benchmarks,tensorflow/benchmarks,annarev/benchmarks