Closed aashish-0393 closed 4 years ago
TPS-ResNet-BiLSTM-Attn.pth
; rename it to TPS-ResNet-BiLSTM-Attn_<iteration to start over>.pth
(for example TPS-ResNet-BiLSTM-Attn_15000.pth
to resume training from 15000 iteration).--FT
flag.
python3 train.py --train_data train/MJ --valid_data validation --select_data / --batch_ratio 1 --Transformation TPS --FeatureExtraction ResNet --SequenceModeling BiLSTM --Prediction Attn --FT --saved_model pretrained/TPS-ResNet-BiLSTM-Attn_15000.pth
@akarazniewicz thank you for the details. I also want to fine tune the models on small dataset, just want to make it sure, this is the only change that is required in command line to fine tune the models. We can do same selection of iteration for other models, CRNN-pyTorchCTC_15000.pth. Is there any logic to come with 15000 number. Also, if I don't want to use TPS, still fine tuning will work using pretrained models right?
- Download pretrained model, You'd like to finetune. For example
TPS-ResNet-BiLSTM-Attn.pth
; rename it toTPS-ResNet-BiLSTM-Attn_<iteration to start over>.pth
(for exampleTPS-ResNet-BiLSTM-Attn_15000.pth
to resume training from 15000 iteration).
I renamed the weight file to None-VGG-BiLSTM-CTC_300000.pth so it starts from iteration 300000:
continue to train, start_iter: 300000
I set the --num_iter
to 1500 (I know it's not high, just for testing). So training should end after 300000+1500 iterations. But it continues. Why?
[301710/1500] Train loss: 0.00004, Valid loss: 2.33314, Elapsed_time: 3631.69746
Current_accuracy : 24.211, Current_norm_ED : 0.62
Best_accuracy : 26.316, Best_norm_ED : 0.62
- Download pretrained model, You'd like to finetune. For example
TPS-ResNet-BiLSTM-Attn.pth
; rename it toTPS-ResNet-BiLSTM-Attn_<iteration to start over>.pth
(for exampleTPS-ResNet-BiLSTM-Attn_15000.pth
to resume training from 15000 iteration).I renamed the weight file to None-VGG-BiLSTM-CTC_300000.pth so it starts from iteration 300000:
continue to train, start_iter: 300000
I set the--num_iter
to 1500 (I know it's not high, just for testing). So training should end after 300000+1500 iterations. But it continues. Why?[301710/1500] Train loss: 0.00004, Valid loss: 2.33314, Elapsed_time: 3631.69746 Current_accuracy : 24.211, Current_norm_ED : 0.62 Best_accuracy : 26.316, Best_norm_ED : 0.62
Did you find anything for this?
hi , I want to train model on small custom dataset . Ho to set the parameters for transfer learning