训练模型时tf.nn.ctc_loss每次运行列车运行时都会产生错误:
tensorflow/core/util/ctc/ctc_loss_calculator.cc:144] No valid path found.
Run Code Online (Sandbox Code Playgroud)
与以前关于此功能的问题不同,这不是由于分歧.我的学习率很低,甚至在第一列火车上都会出现错误.
该模型是CNN - > LSTM - > CTC.这是模型创建代码:
# Build Graph
self.videoInput = tf.placeholder(shape=(None, self.maxVidLen, 50, 100, 3), dtype=tf.float32)
self.videoLengths = tf.placeholder(shape=(None), dtype=tf.int32)
self.keep_prob = tf.placeholder(dtype=tf.float32)
self.targets = tf.sparse_placeholder(tf.int32)
self.targetLengths = tf.placeholder(shape=(None), dtype=tf.int32)
conv1 = tf.layers.conv3d(self.videoInput ...)
pool1 = tf.layers.max_pooling3d(conv1 ...)
conv2 = ...
pool2 = ...
conv3 = ...
pool3 = ...
cnn_out = tf.reshape(pool3, shape=(-1, self.maxVidLength, 4*7*96))
fw_cell = tf.nn.rnn_cell.MultiRNNCell(self.cell(), for _ in range(3))
bw_cell = tf.nn.rnn_cell.MultiRNNCell(self.cell(), for _ in …Run Code Online (Sandbox Code Playgroud)