# I3D resnet action recognition model - expected input shape

**URL:** <https://discuss.pytorch.org/t/i3d-resnet-action-recognition-model-expected-input-shape/194025>\
**Category:** vision\
**Created:** [December 20, 2023, 10:24am UTC](https://discuss.pytorch.org/t/i3d-resnet-action-recognition-model-expected-input-shape/194025 "2023-12-20T10:24:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LewsTherin](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/l/5f9b8f/32.png) [@LewsTherin](https://discuss.pytorch.org/u/LewsTherin)\
**Post date:** [December 20, 2023, 10:24am UTC](https://discuss.pytorch.org/t/i3d-resnet-action-recognition-model-expected-input-shape/194025/1 "2023-12-20T10:24:46Z")

</div>

Hello! I want to fine-tune the I3D model for action recognition from torch hub, which is pre-trained on Kinetics 400 classes, on a custom dataset, where I have 4 possible output classes.

I’m loading the model and modifying the last layer by:

```auto
model = torch.hub.load("facebookresearch/pytorchvideo", "i3d_r50", pretrained=True)
num_classes = 4
model.blocks[6].proj = torch.nn.Linear(2048, num_classes)

```

I couldn’t find any indication as to which is the expected output for the model.  
Currently, I’m passing my data in the shape:

```auto
[batch_size, num_channels, num_images, width, height]

```

Is that correct?
