Rules of thumb for custom resblock models

#1

I’m trying to get into the habit of writing out my own model architectures instead of relying on the pretrained models of Fast.ai in image classification. For now I’m using the basic structure introduced in lesson 7 (https://github.com/fastai/course-v3/blob/master/nbs/dl1/lesson7-resnet-mnist.ipynb):

model = nn.Sequential(
    conv2(1, 8),
    res_block(8),
    conv2(8, 16),
    res_block(16),
    conv2(16, 32),
    res_block(32),
    conv2(32, 16),
    res_block(16),
    conv2(16, 10),
    Flatten()
)

In the lesson Jeremy says the amount of feature layers can be basically anything we want. But are there any good rules of thumb I could follow when determining how many feature layers and res_blocks to add?

0 Likes