a-PyTorch-Tutorial-to-Text-Classification icon indicating copy to clipboard operation
a-PyTorch-Tutorial-to-Text-Classification copied to clipboard

regarding dataset

Open fawazsammani opened this issue 6 years ago • 13 comments

Hello. May you provide a link to download the dataset?

fawazsammani avatar Dec 05 '18 14:12 fawazsammani

https://drive.google.com/open?id=0Bz8a_Dbh9Qhbd2JNdDBsQUdocVU

sgrvinod avatar Dec 06 '18 05:12 sgrvinod

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.

sgrvinod avatar Dec 06 '18 05:12 sgrvinod

Thanks @sgrvinod !!

fawazsammani avatar Dec 06 '18 06:12 fawazsammani

Is it also possible to provide a link to the trained model, temporarily until you include it in the tutorial?

fawazsammani avatar Dec 06 '18 09:12 fawazsammani

Sure, I'll upload it and give you a link by tomorrow

sgrvinod avatar Dec 07 '18 12:12 sgrvinod

https://drive.google.com/open?id=1g9oONLRZrfqqd0gpRMy-9Bocmep65z0m

sgrvinod avatar Dec 09 '18 12:12 sgrvinod

Thank you @sgrvinod !! Really Appreciate it!

fawazsammani avatar Dec 09 '18 13:12 fawazsammani

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!

Susie0731 avatar Dec 08 '19 04:12 Susie0731

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')

fawazsammani avatar Dec 08 '19 04:12 fawazsammani

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!

Susie0731 avatar Dec 08 '19 04:12 Susie0731

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!

Susie0731 avatar Dec 08 '19 04:12 Susie0731

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.

fawazsammani avatar Dec 08 '19 04:12 fawazsammani

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.

It said : [Errno 2] No such file or directory: '/media/ssd/han data\TEST_data.pth.tar' But I didn't find this file :(

Susie0731 avatar Dec 08 '19 05:12 Susie0731