我的错误:
InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor 'label1_' with dtype complex64 and shape [100,129]
[[Node: label1_ = Placeholder[dtype=DT_COMPLEX64, shape=[100,129], _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]
我的代码:
def model_inputs():
"""
Create the model inputs
"""
print('Input data to network..')
inputs_ = tf.placeholder(tf.complex64, [batch_size, sequence_length, freq_resolution], name='inputs')
label1_ = tf.placeholder(tf.complex64, [batch_size, freq_resolution], name='label1_')
label2_ = tf.placeholder(tf.complex64, [batch_size, freq_resolution], name='label2_')
keep_prob_ = tf.placeholder(tf.float32, name='keep_prob')
return inputs_, label1_, label2_, keep_prob_
##################### ###########################################
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
n_batches = (len(mix) // batch_size) -2
for e in range(epochs):
for ii, (x, y, z) in enumerate(utl.get_batches(mix, src1, src2, batch_size), 1):
feed = {inputs_: x, # shape = (batch_size, sequence_length, 129)
label1_: y, # shape = (batch_size, 129)
label2_: z, # shape = (batch_size, 129)
keep_prob_: keep_prob
}
sess.run(tf.global_variables_initializer()) 中发生错误!
来自(utl.get_batches(mix, src1, src2, batch_size), 1):
的输入与占位符的形状相同。
为什么会发生这种错误?