I tried to extract features for frames in videos. So I first split video into frames with 32fps. And then I use the following code to extract pool 5 layer as features (save to .pt).
def Preprocess(input_image):
    transform = transforms.Compose([
        transforms.Resize(256),
        transforms.CenterCrop(224),
        transforms.ToTensor(),
        transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
    ])
    input_tensor = transform(input_image)
    batch = input_tensor.unsqueeze(0) # create a mini-batch as expected by the model
    return batch

input_image = Image.open(inputFile)
input_batch = Preprocess(input_image)
model = models.resnet101(pretrained=True)

res101_conv = nn.Sequential(*list(model.children())[:-1])

for param in res101_conv.parameters():
     param.requires_grad = False
outputs = res101_conv(input_batch)
result = outputs[0].flatten()

And I check the output of each frames, frame 1 feature is similar to frame 1000. I used consine similarity to check. this is the code.
cosine = nn.CosineSimilarity(dim=1, eps=1e-6)
print(cosine(frame_one.view(1, -1), frame_two.view(1, -1)))