a-PyTorch-Tutorial-to-Text-Classification
a-PyTorch-Tutorial-to-Text-Classification copied to clipboard
regarding dataset
Hello. May you provide a link to download the dataset?
https://drive.google.com/open?id=0Bz8a_Dbh9Qhbd2JNdDBsQUdocVU
It's from this Google Drive folder, uploaded (I believe) by the same Xiang Zhang who is the lead author of the paper Zhang et al., 2015 referenced in the HAN paper as the source of the dataset.
Thanks @sgrvinod !!
Is it also possible to provide a link to the trained model, temporarily until you include it in the tutorial?
Sure, I'll upload it and give you a link by tomorrow
https://drive.google.com/open?id=1g9oONLRZrfqqd0gpRMy-9Bocmep65z0m
Thank you @sgrvinod !! Really Appreciate it!
https://drive.google.com/open?id=1g9oONLRZrfqqd0gpRMy-9Bocmep65z0m
Hi! It seems that the zip file of the trained model is broken. When I tried to unzip this file, it didn't work!
This is not for you to unzip it. It's a .tar model to be loaded directly in PyTorch. This is not the trained model zipped in a file, it is the parameters of the model saved in a dictionary file in .tar format, one of the formats that PyTorch expects when loading a saved model.
You should load it directly: torch.load('BEST_checkpoint_han.pth.tar')
This is not for you to unzip it. It's a .tar model to be loaded directly in PyTorch. This is not the trained model zipped in a file, it is the parameters of the model saved in a dictionary file in .tar format, one of the formats that PyTorch expects when loading a saved model.
You should load it directly:
torch.load('BEST_checkpoint_han.pth.tar')
Thx! It's really helpful!
torch.load('BEST_checkpoint_han.pth.tar')
Well, sorry! There are still some bugs... After I add this code :torch.load('BEST_checkpoint_han.pth.tar') to train.py and modify: word2vec_file = os.path.join(data_folder, 'word2vec_model') to :word2vec_file = os.path.join(data_folder, 'BEST_checkpoint_han.pth.tar'), it didn't work! Do I need to add or modify something in train.py? Or was I just wrong? Thx!
Why are you adding it to the train.py? You want to do evaluation, right? Just run eval.py, no need to change anything else. The checkpoint name is already in the eval.py. Just place the checkpoint you downloaded in the corresponding directory.
Why are you adding it to the
train.py? You want to do evaluation, right? Just runeval.py, no need to change anything else. The checkpoint name is already in theeval.py.Just place the checkpoint you downloaded in the corresponding directory.
It said : [Errno 2] No such file or directory: '/media/ssd/han data\TEST_data.pth.tar' But I didn't find this file :(