juntang-zhuang / ShelfNet

implementation for paper "ShelfNet for fast semantic segmentation"
MIT License
252 stars 41 forks source link

How to load pretrained weights for training #19

Closed poornimajd closed 4 years ago

poornimajd commented 4 years ago

Hi great work @juntang-zhuang . I have trained the model on a custom dataset(say dataset1),and I also have another dataset(say dataset2),which is similar to dataset1,and hence I want to assign the custom dataset trained model weights as the initial weights for training the model on the dataset2.In the code I did not find where exactly we need to load the pretrained weights for training. Any suggestion is appreciated Thank you

juntang-zhuang commented 4 years ago

Hi, I did not write resume in "city_lw" branch. You can insert code to load state dict after creating the model in train.py, like https://pytorch.org/tutorials/beginner/saving_loading_models.html. (PS, I'm not familiar with loading state in distributed mode, but I suppose it's similar to a centralized scenario)

poornimajd commented 4 years ago

Thanks for the quick reply! I will check it out.