Closed murthy95 closed 3 years ago
Hey @murthy95, yes that would be great! I actually had this on my list but seems like I forgot to add it in the first version. For the pytorch template, that's fairly easy, you can just pass the number to the torchvision model, e.g. torchvision.models.alexnet(num_classes=10)
. For sklearn, I think it's impossible to set it manually, unfortunately (because it just infers the number of classes from the data), but if you find an option, let me know!
Some more thoughts:
Long-term it would also be great to infer this value automatically from the input data but for now manually setting it should be enough.
@jrieke True for pytorch models its fairly easy but if we want to support pretrained imagenet weights for transfer learning we need to load weights and then change the final fc layer. At least this what I did in my PR if there is some better way please point it out.
@murthy95 Good point, didn't think about that. Just had a brief look through your PR (#6), looks good so far. I'll try it out during the next days (bit busy right now) and get back.
@murthy95 Sorry for the long delay, I was busy with another projects the last 2 weeks. Anyway, I merged your PR and it's now live on the website! 🥳
Just adapted the fields in the sidebar a bit. Closing this for now but let me know if you have more thoughts. Thanks again for contributing! ❤️
Hello! I am planning to add an option to declare number of classes for image classification model. This also helps for transfer learning.