I get the same output using resnet18:
class myModel(nn.Module):
	def __init__(self):
		super(myModel, self).__init__()
		model = models.resnet18(pretrained=True)
		modules=list(model.children())[:-1]
		self.backbone = nn.Sequential(*modules)
		self.fc = nn.Linear(512, 2)
		
	def forward(self, x):
		feat = self.backbone(x).squeeze()
		x = self.fc(feat)
		return x, feat

model = myModel()

x = torch.randn(1, 3, 224, 224)
out, feat = model(x)
for _ in range(10):
    out_tmp, feat_tmp = model(x)
    print(torch.allclose(out, out_tmp))
    print(torch.allclose(feat, feat_tmp))

That being said, since the model is in training mode, the internal statistics of batchnorm layers will be updated (and dropout will be used if defined in the model).
To get the same outputs, it’s recommended to use model.eval() to disable dropout and use the running estimates of all batchnorm layers.