actually I just now put the breakpoint in the
class ResNet(nn.Module):

    def __init__(self, block, layers, embedding_size=64):

and was able to print value of layers[0] which is 2. Previously put the breakpoint in forward pass and it just jumped to the error.
Anyhow, still not sure how to fix this error I am getting.