Pytorch Model from a List of Layers


Hello Reader,

Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below โ†“

Creating a Pytorch model from a list of layers

Sometimes you might need to use a list of layers when building your Pytorch model.
โ€‹
For example, you might have a block of layers (conv followed by batch norm followed by max pool) and you want to duplicate this block several times.
โ€‹
In this case, you can create a list of these blocks and then you should use ๐ญ๐จ๐ซ๐œ๐ก.๐ง๐ง.๐Œ๐จ๐๐ฎ๐ฅ๐ž๐‹๐ข๐ฌ๐ญ to register this list inside your ๐ง๐ง.๐Œ๐จ๐๐ฎ๐ฅ๐ž (Pytorch model).
โ€‹
Below is a code example from the documentation that showcases how you can register a list of linear layers inside your Pytorch model.

More on ModuleList can be found here.

โ€‹

Interested in MLOps?

MLOps is not just a hype term, itโ€™s actually a necessary paradigm for ensuring long term performance of your ML models.

Two main goals of MLOps are :

  • To have continuous monitoring of your models in production.
  • To ensure continuous training and testing of your models.

โ€‹This article outlines some books that can help you tap into the field of MLOps.

โ€‹

That's it for this week's edition, I hope you enjoyed it!

Machine Learning for Medical Imaging

๐Ÿ‘‰ Learn how to build AI systems for medical imaging domain by leveraging tools and techniques that I share with you! | ๐Ÿ’ก The newsletter is read by people from: Nvidia, Baker Hughes, Harvard, NYU, Columbia University, University of Toronto and more!

Read more from Machine Learning for Medical Imaging

Hi Reader! I hope you're doing well in this fine weekend! In the past weeks I've been working on implementing basic image segmentation models for 2D and 3D from scratch. While doing so, I found a few things that were delightfully surprising while other things were painfully irritating. I tell you all about it in this edition of the newsletter! What Building AI Models from Scratch has Thought me One of the reasons why I did these experimentations was to understand some of the nitty gritty...

Hi Reader, I haven't sent you a newsletter email for some time now. This is because there are major events happening in my personal life. We just had our first kid, so I'm still trying to adapt to the new routine set by this cute little creature! I also changed my office! I used to work from home, but now I am working in a coworking space. I'm hoping that this will help me deliver more value to the newsletter subscribers as well as our clients at PYCAD. Now, back to the newsletter! I've got...

Dental implant - Wikipedia

Hello Reader, Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below โ†“ Applications of Machine Learning for Dentistry At PYCAD, we have worked a lot on the applications of AI to the dentistry domain. Here are 3 incredible ones. 1 - Diagnosis and...