sooftware / kospeech

Open-Source Toolkit for End-to-End Korean Automatic Speech Recognition leveraging PyTorch and Hydra.
https://sooftware.github.io/kospeech/
Apache License 2.0
603 stars 191 forks source link

seq2seq import 문제 #42

Closed wql7654 closed 4 years ago

wql7654 commented 4 years ago

처음 pretrain 을 해볼려고 model.pt 를 다운받고 bash run_pretrain.sh 실행했는데

Traceback (most recent call last): File "run_pretrain.py", line 33, in model = load_test_model(opt, opt.device) File "../kospeech/model_builder.py", line 136, in load_test_model model = torch.load(opt.model_path, map_location=lambda storage, loc: storage).to(device) File "/root/anaconda3/envs/lee_stt/lib/python3.7/site-packages/torch/serialization.py", line 585, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/root/anaconda3/envs/lee_stt/lib/python3.7/site-packages/torch/serialization.py", line 765, in _legacy_load result = unpickler.load() ModuleNotFoundError: No module named 'kospeech.models.seq2seq'

이런에러가뜹니다 혹시 위치를 못찾아서 그런가해서 kospeech/models 에 seq2seq 를 복사해줬는데

Traceback (most recent call last): File "run_pretrain.py", line 33, in model = load_test_model(opt, opt.device) File "../kospeech/model_builder.py", line 136, in load_test_model model = torch.load(opt.model_path, map_location=lambda storage, loc: storage).to(device) File "/root/anaconda3/envs/lee_stt/lib/python3.7/site-packages/torch/serialization.py", line 585, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/root/anaconda3/envs/lee_stt/lib/python3.7/site-packages/torch/serialization.py", line 765, in _legacy_load result = unpickler.load() ModuleNotFoundError: No module named 'kospeech.models.seq2seq.seq2seq'; 'kospeech.models.seq2seq' is not a package

계속 이런식으로 에러가뜹니다.. 무엇이 문제인걸까요..

sooftware commented 4 years ago

에구,, 최근 코드 폴더 구조를 개편했는데, 거기서 에러가 나는것 같네요 ㅠ.ㅠ
model.pt를 로드하셔서 key 값을 수정해주셔야 할 것 같아요.

wql7654 commented 4 years ago

model 에서 위치를 다시잡아주니 다른에러가 뜨네요. 나중에 패치버전이 나올때까지 기다리겠습니다.!