pycox
pycox copied to clipboard
make a net based on pretrained model
Hi Havard. I have MRI images as Dataset. As I do not have a lot of datasets is it possible to load a pretrained model for segmentation purposes delete some of that pretrained model and connect it to the fully connected layers for predicting? My purpose is making the net that you give to deepsurv or logistichazard with mixture of the pretrained model and my fully connected layers.
Yes, this is possible, but there are no tools in pycox or torchtuples that will help you with this. So I would recommend just looking up how to delete some top layers in pytorch.
You can create a new dataset by passing your data though this fixed network, and then then make a new model in pycox that use this dataset rather than your original. So if x_i
is a picture, you get the z_i = fixed_net(x_i)
, and you make a model that use net(z_i)
. Does that make sense?