I’m still unsure about the output shape. If you would like to get an output in the shape [batch_size, 17*100=1700], you could define the out_features of the last linear layer to be 1700.
The input shape should work, since the resnets in torchvision use adaptive pooling layers before feeding the activation to the linear layer which makes the input shape more flexible.
Note, however, that the input should have the shape [batch_size, channels, height, width], so you might need to permute it.