You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
我在 bilstm层上加crf 报一下问题:
/data/software/anaconda2/envs/py3_tf4/lib/python3.5/site-packages/tensorflow/python/ops/gradients_impl.py:96: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
"Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
Hi 不确定你的bilistm_output的输出shape是怎么样子的
另外crf的参数如下:
tf.contrib.crf.crf_log_likelihood
crf_log_likelihood(
inputs,
tag_indices,
sequence_lengths,
transition_params=None
)
inputs: A [batch_size, max_seq_len, num_tags] tensor of unary potentials to use as input to the CRF layer.
tag_indices: A [batch_size, max_seq_len] matrix of tag indices for which we compute the log-likelihood.
sequence_lengths: A [batch_size] vector of true sequence lengths.
transition_params: A [num_tags, num_tags] transition matrix, if available.
我在 bilstm层上加crf 报一下问题:
/data/software/anaconda2/envs/py3_tf4/lib/python3.5/site-packages/tensorflow/python/ops/gradients_impl.py:96: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
"Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
训练代码大概如下所示:
def trainModel(self):
with tf.variable_scope('Inputs'):
self.X_inputs = tf.placeholder(tf.int32, [None, self.timestep_size], name='X_input') # 输入
self.y_inputs = tf.placeholder(tf.int32, [None, self.timestep_size], name='y_input') # 对应的标记
The text was updated successfully, but these errors were encountered: