Closed Qiuyu-Ding closed 1 year ago
Thanks for your question. Sorry to hear that you are not able to run the code. There may be various reasons for this:
Thanks for your question. Sorry to hear that you are not able to run the code. There may be various reasons for this:
- Maybe your vocab size is so large that torch.matmul() takes up too much memory. You may need to calculate it in batches instead of all at once.
- Have you used all data required during training and testing?(aligned source/target static embedding,aligned source/target context embedding, source/target context embedding)
Thank you for your patient reply! Yes, you are right, the data i used for test maybe wrong, which lead to this error. Thank you so much~
As mentioned, i'm trying to test the unsuperised method, but when i run the test.sh: src=ar tgt=en model_path=../checkpoints/$src-$tgt-add_orign_nw.pkl_last CUDA_VISIBLE_DEVICES=0,1 python test.py --model_path $model_path \ --dict_path ../$src-$tgt.5000-6500.txt --mode v2 \ --src_lang $src --tgt_lang $tgt \ --reload_src_ctx $path1 \ --reload_tgt_ctx $path2 --lambda_w1 0.11 it always tell me that "RuntimeError: CUDA out of memory. Tried to allocate 2.82 GiB (GPU 0; 31.75 GiB total capacity; 28.74 GiB already allocated; 1.84 GiB free; 28.75 GiB reserved in total by PyTorch)", is it right? and can you give some advices? Thanks!