HHTseng / video-classification

Tutorial for video classification/ action recognition using 3D CNN/ CNN+RNN on UCF101
916 stars 216 forks source link

pretrained 3d cnn #10

Open amihanpour opened 5 years ago

amihanpour commented 5 years ago

Hello!

How can I create a pretrain model with your 3D convolutional code? (for example, ResNet3DCNN)

mampferd commented 4 years ago

Hi, just insert: cnn_encoder.load_state_dict(torch.load(os.path.join(save_model_path, 'cnn_encoder_epoch101.pth'))) optimizer.load_state_dict(torch.load(os.path.join(save_model_path, 'optimizer_epoch101.pth'))) rnn_decoder.load_state_dict(torch.load(os.path.join(save_model_path, 'rnn_decoder_epoch101.pth'))) before '# start training for epoch in range(epochs): # improves the used max_epoch pre-trained weights' in the UCF101_ResNetCRNN.py file (and adjust the number in case you use another pre-trained set). The pretrained weights have to be stored in a folder named 'ResNetCRNN_ckpt' in the same folder as the .py file Pre-trained models