The order of the layer initialization seems to be different, so that resetting the seed won’t yield the same results.
After removing the init methods 6 and resetting the seed before each layer creation (in the ResNet class as well as in BasicBlock, conv1x1, and conv3x3) I get the same results.
That being said, I wouldn’t rely on the seed to yield the exact same results in such a setup, where the order of operations might be different.
I.e. the order in which each modules are passed to model.apply() is apparently different from the order these layers are created in the ResNet class.