RookieJunChen / FullSubNet-plus

The official PyTorch implementation of "FullSubNet+: Channel Attention FullSubNet with Complex Spectrograms for Speech Enhancement".
Apache License 2.0
235 stars 55 forks source link

OSError: [Errno 22] Invalid argument: '.../FullSubNet-plus/result/output/2022-11-11 01:25:28.toml' #18

Closed axuan731 closed 1 year ago

axuan731 commented 1 year ago

学长您好,可以帮我看一下这个是什么问题导致的吗?我不明白一开始的use specified dataset_dir_list: ['result/data'], instead of in config是什么意思,我放了绝对路径相对路径都不行,感谢您的帮助。 `(speech_enhance) 123@123-Lenovo-Legion-R7000P2020H:/media/123/Axuan2/FullSubNet-plus$ ./A.sh use specified dataset_dir_list: ['result/data'], instead of in config OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead. [2022-11-11 01:25:27.873] Using CPU in the experiment. [2022-11-11 01:25:27.874] Loading inference dataset... [2022-11-11 01:25:27.883] Loading model... [2022-11-11 01:25:27.996] 当前正在处理 tar 格式的模型断点,其 epoch 为:194. [2022-11-11 01:25:28.019] Configurations are as follows: [2022-11-11 01:25:28.020] [acoustics] n_fft = 512 win_length = 512 sr = 16000 hop_length = 256

[inferencer] path = "fullsubnet_plus.inferencer.inferencer.Inferencer" type = "mag_complex_full_band_crm_mask"

[dataset] path = "fullsubnet.dataset.dataset_inference.Dataset"

[model] path = "fullsubnet_plus.model.fullsubnet_plus.FullSubNet_Plus"

[inferencer.args] n_neighbor = 15

[dataset.args] dataset_dir_list = [ "result/data",] sr = 16000

[model.args] sb_num_neighbors = 15 fb_num_neighbors = 0 num_freqs = 257 look_ahead = 2 sequence_model = "LSTM" fb_output_activate_function = "ReLU" sb_output_activate_function = false channel_attention_model = "TSSE" fb_model_hidden_size = 512 sb_model_hidden_size = 384 weight_init = false norm_type = "offline_laplace_norm" num_groups_in_drop_band = 2 kersize = [ 3, 5, 10,] subband_num = 1

Traceback (most recent call last): File "/home/123/anaconda3/envs/speech_enhance/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/123/anaconda3/envs/speech_enhance/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/media/123/Axuan2/FullSubNet-plus/speech_enhance/tools/inference.py", line 37, in main(configuration, checkpoint_path, output_dir) File "/media/123/Axuan2/FullSubNet-plus/speech_enhance/tools/inference.py", line 13, in main inferencer = inferencer_class( File "/media/123/Axuan2/FullSubNet-plus/speech_enhance/fullsubnet_plus/inferencer/inferencer.py", line 54, in init super().init(config, checkpoint_path, output_dir) File "/media/123/Axuan2/FullSubNet-plus/speech_enhance/audio_zen/inferencer/base_inferencer.py", line 59, in init with open((root_dir / f"{time.strftime('%Y-%m-%d %H:%M:%S')}.toml").as_posix(), "w") as handle: OSError: [Errno 22] Invalid argument: '/media/123/Axuan2/FullSubNet-plus/result/output/2022-11-11 01:25:28.toml'`

RookieJunChen commented 1 year ago

output_dir应该是某个具体的文件夹,而不是文件 我看你这里输出的错误是

'/media/123/Axuan2/FullSubNet-plus/result/output/2022-11-11 01:25:28.toml'

是不是你output_dir写成这个报错了?

axuan731 commented 1 year ago

output_dir应该是某个具体的文件夹,而不是文件

我看你这里输出的错误是

'/media/123/Axuan2/FullSubNet-plus/result/output/2022-11-11 01:25:28.toml'

是不是你output_dir写成这个报错了?

您好,可能不是这个问题,我执行的命令是python -m speech_enhance.tools.inference -C config/inference.toml -M best_model.tar -I result/data -O result/output

axuan731 commented 1 year ago

我尝试把with open((root_dir / f"{time.strftime('%Y-%m-%d %H:%M:%S')}.toml").asposix(), "w") as handle:中的%H:%M:%S改成了%H%M_%S,程序跑起来了,我用cpu跑的但是runtimeerror了,请完哪里改batch_size呢

RookieJunChen commented 1 year ago

我代码里设定inference的时候batch_size默认为1的,你还想要改小嘛?

axuan731 commented 1 year ago

我的电脑可能带不动了😂感谢您的回复