问题描述
- speech-enhancement工程 [https://github.com/jtkim-kaist/Speech-enhancement]
- 使用环境
- tensorflow 1.7
- librosa
- matlab2017a
- tensorboardX
当我运行main.py时,发生以下错误。此时,使用的模型是fnn。 后来,当我在trnmodle.py中检查fnn模型时,我发现了错误的原因。 但是,我没有修改datareader.py中的参数或命令。当我使用lstm模型时发生了同样的错误。
ValueError: Cannot feed value of shape (256, 9, 129, 1) for Tensor ‘model/inputs:0’, which has shape ‘(?, 129, 1, 1)’
调用的fnn模型的为 config.py ,如下所示:
import numpy as np
import os
mode = "fnn" # fnn, fcn, lstm, sfnn, irm, tsn
if mode == 'lstm':
time_width = int(16)
else:
time_width = int(9)
fs = float(8000)
win_size = int(0.025 * fs) # The number of samples in window
win_step = int(0.010 * fs)
# nfft = np.int(2 ** (np.floor(np.log2(win_size) + 1)))
nfft = np.int(256)
freq_size = int(nfft/2+1)
lr = 0.0001
lrDecayRate = .99 # 0.99
lrDecayFreq = 2000
keep_prob = 0.9
global_std = 1.18
device = '/gpu:0'