Skip to content

is there some template for creating my own model ? #1075

Answered by rwightman
aliutkus asked this question in Ideas
Discussion options

You must be logged in to vote

@aliutkus that's a good question and I should have a guide for that, right now, the only guide is the existing models and the unit tests, the unit tests cover the core model API so if you created a model in timm and it's implemented correctly, it'll get picked up by the unit tests and pass.

The models are fairly standard PyTorch models (not much different from torchvision) with some extras and some uniformity for certain args.

To add a model in timm you need:

  • model class that inherits from nn.Module (ie ResNet) and implements the architecture
  • a model 'entrypoint function' w/ a specific architecture definition (ie resnet50) that instantiates the class w/ args for a variant of that archite…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@rwightman
Comment options

@rwightman
Comment options

Answer selected by aliutkus
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants