Closed ghost closed 4 years ago
안녕하세요. 지난주 보내주신 pre-trained weight 잘 받았습니다. 감사합니다!
보내주신 weight로 eval.py를 돌려봤는데 아래와 같은 에러가 나는데 확인해보니 attention.py에 ScaledDotProductAttention가 없더라구요ㅠ 추가해주시거나 제가 수정을 할 수 방안을 알려주실 수 있는지 문의드립니다!
[2020-06-21 02:51:36,690 utils.py:21 - info()] --mode: eval [2020-06-21 02:51:36,690 utils.py:21 - info()] --sample_rate: 16000 [2020-06-21 02:51:36,690 utils.py:21 - info()] --window_size: 20 [2020-06-21 02:51:36,690 utils.py:21 - info()] --stride: 10 [2020-06-21 02:51:36,690 utils.py:21 - info()] --n_mels: 80 [2020-06-21 02:51:36,690 utils.py:21 - info()] --normalize: True [2020-06-21 02:51:36,690 utils.py:21 - info()] --del_silence: True [2020-06-21 02:51:36,690 utils.py:21 - info()] --input_reverse: True [2020-06-21 02:51:36,690 utils.py:21 - info()] --feature_extract_by: librosa [2020-06-21 02:51:36,690 utils.py:21 - info()] --time_mask_para: 50 [2020-06-21 02:51:36,691 utils.py:21 - info()] --freq_mask_para: 12 [2020-06-21 02:51:36,691 utils.py:21 - info()] --time_mask_num: 2 [2020-06-21 02:51:36,691 utils.py:21 - info()] --freq_mask_num: 2 [2020-06-21 02:51:36,691 utils.py:21 - info()] --dataset_path: ../../DATA/KsponSpeech_01/KsponSpeech_0001/ [2020-06-21 02:51:36,691 utils.py:21 - info()] --data_list_path: ../data/data_list/toy_test_list.csv [2020-06-21 02:51:36,691 utils.py:21 - info()] --label_path: ./data/label/aihub_labels.csv [2020-06-21 02:51:36,691 utils.py:21 - info()] --num_workers: 4 [2020-06-21 02:51:36,691 utils.py:21 - info()] --use_cuda: True [2020-06-21 02:51:36,691 utils.py:21 - info()] --model_path: ../data/checkpoints/model.pt [2020-06-21 02:51:36,691 utils.py:21 - info()] --batch_size: 8 [2020-06-21 02:51:36,691 utils.py:21 - info()] --decode: greedy [2020-06-21 02:51:36,691 utils.py:21 - info()] --k: 5 [2020-06-21 02:51:36,691 utils.py:21 - info()] --print_every: 10 [2020-06-21 02:51:36,727 utils.py:21 - info()] Operating System : Linux 4.19.104+ [2020-06-21 02:51:36,727 utils.py:21 - info()] Processor : x86_64 [2020-06-21 02:51:36,729 utils.py:21 - info()] device : Tesla T4 [2020-06-21 02:51:36,729 utils.py:21 - info()] CUDA is available : True [2020-06-21 02:51:36,729 utils.py:21 - info()] CUDA version : 10.1 [2020-06-21 02:51:36,729 utils.py:21 - info()] PyTorch version : 1.5.0+cu101 Traceback (most recent call last): File "./eval.py", line 66, in <module> main() File "./eval.py", line 62, in main inference(opt) File "./eval.py", line 25, in inference model = load_test_model(opt, device) File "../kospeech/model_builder.py", line 116, in load_test_model model = torch.load(opt.model_path, map_location=lambda storage, loc: storage).to(device) File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 593, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 773, in _legacy_load result = unpickler.load() AttributeError: Can't get attribute 'ScaledDotProductAttention' on <module 'kospeech.model.attention' from '../kospeech/model/attention.py'>
아 ㅠ.ㅠ 해당 weight도 예전 코드인가보네요. 다시 보내드리겠습니다.
감사합니다! 잘 받았습니다!
안녕하세요. 지난주 보내주신 pre-trained weight 잘 받았습니다. 감사합니다!
보내주신 weight로 eval.py를 돌려봤는데 아래와 같은 에러가 나는데 확인해보니 attention.py에 ScaledDotProductAttention가 없더라구요ㅠ 추가해주시거나 제가 수정을 할 수 방안을 알려주실 수 있는지 문의드립니다!